diff --git a/dist/engine.bundle.js b/dist/engine.bundle.js index 3eb986bdb..dae75b2f4 100644 --- a/dist/engine.bundle.js +++ b/dist/engine.bundle.js @@ -165,7 +165,7 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Player; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadPlayer; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Corporation/Corporation */ 260);\n/* harmony import */ var _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/Player/PlayerObject */ 644);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Exploits/Exploit */ 222);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\nlet Player = new _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__[/* PlayerObject */ \"a\"]();\nfunction loadPlayer(saveString) {\n Player = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n Player.money = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.money);\n\n if (Player.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]) {\n Player.corporation.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.funds);\n Player.corporation.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.revenue);\n Player.corporation.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.expenses);\n\n for (var i = 0; i < Player.corporation.divisions.length; ++i) {\n var ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleRevenue);\n ind.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleExpenses);\n ind.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleRevenue);\n ind.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleExpenses);\n }\n }\n\n Player.exploits = Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* sanitizeExploits */ \"c\"])(Player.exploits);\n}\n\n//# sourceURL=webpack:///./src/Player.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Player; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadPlayer; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Corporation/Corporation */ 261);\n/* harmony import */ var _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/Player/PlayerObject */ 644);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Exploits/Exploit */ 223);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\nlet Player = new _PersonObjects_Player_PlayerObject__WEBPACK_IMPORTED_MODULE_1__[/* PlayerObject */ \"a\"]();\nfunction loadPlayer(saveString) {\n Player = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n Player.money = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.money);\n\n if (Player.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]) {\n Player.corporation.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.funds);\n Player.corporation.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.revenue);\n Player.corporation.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](Player.corporation.expenses);\n\n for (var i = 0; i < Player.corporation.divisions.length; ++i) {\n var ind = Player.corporation.divisions[i];\n ind.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleRevenue);\n ind.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.lastCycleExpenses);\n ind.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleRevenue);\n ind.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"](ind.thisCycleExpenses);\n }\n }\n\n Player.exploits = Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* sanitizeExploits */ \"c\"])(Player.exploits);\n}\n\n//# sourceURL=webpack:///./src/Player.js?"); /***/ }), /* 3 */ @@ -177,7 +177,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return numeralWrapper; });\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 120);\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 1095);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 1096);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 1097);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 1098);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 1099);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 1100);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 1101);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 1102);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 1103);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 1104);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 1105);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 1106);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 1107);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 1108);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n constructor() {\n _defineProperty(this, \"defaultLocale\", \"en\");\n\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l) {\n if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale);\n return false;\n }\n\n return true;\n }\n\n format(n, format) {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n\n const answer = numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format);\n\n if (answer === \"NaN\") {\n return `${n}`;\n }\n\n return answer;\n }\n\n formatBigNumber(n) {\n return this.format(n, \"0.000a\");\n } // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n\n\n formatReallyBigNumber(n, decimalPlaces = 3) {\n if (n === Infinity) return \"∞\";\n\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n) {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n) {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n) {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n) {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n) {\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n, decimalPlaces = 2) {\n const formatter = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n) {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n) {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n) {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n) {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n) {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n) {\n return this.format(n, \"0,0\");\n }\n\n parseMoney(s) {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral__WEBPACK_IMPORTED_MODULE_0___default()(s).value();\n const parsed = parseFloat(s);\n\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n\n}\n\nconst numeralWrapper = new NumeralFormatter();\n\n//# sourceURL=webpack:///./src/ui/numeralFormat.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return numeralWrapper; });\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! numeral */ 121);\n/* harmony import */ var numeral__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(numeral__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! numeral/locales/bg */ 1098);\n/* harmony import */ var numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_bg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! numeral/locales/cs */ 1099);\n/* harmony import */ var numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_cs__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! numeral/locales/da-dk */ 1100);\n/* harmony import */ var numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_da_dk__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! numeral/locales/de */ 1101);\n/* harmony import */ var numeral_locales_de__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_de__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! numeral/locales/en-au */ 1102);\n/* harmony import */ var numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_au__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! numeral/locales/en-gb */ 1103);\n/* harmony import */ var numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_en_gb__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! numeral/locales/es */ 1104);\n/* harmony import */ var numeral_locales_es__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_es__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! numeral/locales/fr */ 1105);\n/* harmony import */ var numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_fr__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! numeral/locales/hu */ 1106);\n/* harmony import */ var numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_hu__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! numeral/locales/it */ 1107);\n/* harmony import */ var numeral_locales_it__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_it__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! numeral/locales/lv */ 1108);\n/* harmony import */ var numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_lv__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! numeral/locales/no */ 1109);\n/* harmony import */ var numeral_locales_no__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_no__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! numeral/locales/pl */ 1110);\n/* harmony import */ var numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_pl__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! numeral/locales/ru */ 1111);\n/* harmony import */ var numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(numeral_locales_ru__WEBPACK_IMPORTED_MODULE_14__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* eslint-disable class-methods-use-this */\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\n\nclass NumeralFormatter {\n // Default Locale\n constructor() {\n _defineProperty(this, \"defaultLocale\", \"en\");\n\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l) {\n if (numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n numeral__WEBPACK_IMPORTED_MODULE_0___default.a.locale(this.defaultLocale);\n return false;\n }\n\n return true;\n }\n\n format(n, format) {\n // numeraljs doesnt properly format numbers that are too big or too small\n if (Math.abs(n) < 1e-6) {\n n = 0;\n }\n\n const answer = numeral__WEBPACK_IMPORTED_MODULE_0___default()(n).format(format);\n\n if (answer === \"NaN\") {\n return `${n}`;\n }\n\n return answer;\n }\n\n formatBigNumber(n) {\n return this.format(n, \"0.000a\");\n } // TODO: leverage numeral.js to do it. This function also implies you can\n // use this format in some text field but you can't. ( \"1t\" will parse but\n // \"1s\" will not)\n\n\n formatReallyBigNumber(n, decimalPlaces = 3) {\n if (n === Infinity) return \"∞\";\n\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < n && n <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n\n if (Math.abs(n) < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\n }\n\n const str = this.format(n, \"0.\" + \"0\".repeat(decimalPlaces) + \"a\");\n if (str === \"NaNt\") return this.format(n, \"0.\" + \" \".repeat(decimalPlaces) + \"e+0\");\n return str;\n }\n\n formatHp(n) {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n) {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n) {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n) {\n return this.format(n, \"0,0\");\n }\n\n formatRAM(n) {\n return this.format(n, \"0.00\") + \"GB\";\n }\n\n formatPercentage(n, decimalPlaces = 2) {\n const formatter = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n) {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n) {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n) {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n) {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n) {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n) {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n) {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n) {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n) {\n return this.format(n, \"0,0\");\n }\n\n parseMoney(s) {\n // numeral library does not handle formats like 1e10 well (returns 110),\n // so if both return a valid number, return the biggest one\n const numeralValue = numeral__WEBPACK_IMPORTED_MODULE_0___default()(s).value();\n const parsed = parseFloat(s);\n\n if (isNaN(parsed) && numeralValue === null) {\n return NaN;\n } else if (isNaN(parsed)) {\n return numeralValue;\n } else if (numeralValue === null) {\n return parsed;\n } else {\n return Math.max(numeralValue, parsed);\n }\n }\n\n}\n\nconst numeralWrapper = new NumeralFormatter();\n\n//# sourceURL=webpack:///./src/ui/numeralFormat.ts?"); /***/ }), /* 4 */, @@ -314,7 +314,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return removePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Popup */ 642);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElementById */ 211);\n/**\n * Create a pop-up dialog box using React.\n *\n * Calling this function with the same ID and React Root Component will trigger a re-render\n *\n * @param id The (hopefully) unique identifier for the popup container\n * @param rootComponent Root React Component for the content (NOT the popup containers themselves)\n */\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})(); // This variable is used to avoid setting the semi-transparent background\n// several times on top of one another. Sometimes there's several popup at once.\n\n\nlet deepestPopupId = \"\"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createPopup(id, rootComponent, props, onClose) {\n let container = document.getElementById(id);\n\n if (container == null) {\n function onClick(event) {\n if (!event.srcElement) return;\n if (!(event.srcElement instanceof HTMLElement)) return;\n const clickedId = event.srcElement.id;\n if (clickedId !== id) return;\n removePopup(id);\n if (onClose) onClose();\n }\n\n const backgroundColor = deepestPopupId === \"\" ? \"rgba(0,0,0,0.5)\" : \"rgba(0,0,0,0)\";\n container = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id,\n backgroundColor: backgroundColor,\n mouseDown: onClick\n });\n gameContainer.appendChild(container);\n }\n\n if (deepestPopupId === \"\") deepestPopupId = id;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"render\"](react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Popup__WEBPACK_IMPORTED_MODULE_2__[/* Popup */ \"a\"], {\n content: rootComponent,\n id: id,\n props: props,\n removePopup: () => {\n removePopup(id);\n if (onClose) onClose();\n }\n }), container);\n return container;\n}\n/**\n * Closes a popup created with the createPopup() function above\n */\n\nfunction removePopup(id) {\n const content = document.getElementById(`${id}`);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](content);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(id);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(`${id}-close`);\n if (id === deepestPopupId) deepestPopupId = \"\";\n}\n\n//# sourceURL=webpack:///./src/ui/React/createPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return removePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Popup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Popup */ 642);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElementById */ 212);\n/**\n * Create a pop-up dialog box using React.\n *\n * Calling this function with the same ID and React Root Component will trigger a re-render\n *\n * @param id The (hopefully) unique identifier for the popup container\n * @param rootComponent Root React Component for the content (NOT the popup containers themselves)\n */\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})(); // This variable is used to avoid setting the semi-transparent background\n// several times on top of one another. Sometimes there's several popup at once.\n\n\nlet deepestPopupId = \"\"; // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createPopup(id, rootComponent, props, onClose) {\n let container = document.getElementById(id);\n\n if (container == null) {\n function onClick(event) {\n if (!event.srcElement) return;\n if (!(event.srcElement instanceof HTMLElement)) return;\n const clickedId = event.srcElement.id;\n if (clickedId !== id) return;\n removePopup(id);\n if (onClose) onClose();\n }\n\n const backgroundColor = deepestPopupId === \"\" ? \"rgba(0,0,0,0.5)\" : \"rgba(0,0,0,0)\";\n container = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id,\n backgroundColor: backgroundColor,\n mouseDown: onClick\n });\n gameContainer.appendChild(container);\n }\n\n if (deepestPopupId === \"\") deepestPopupId = id;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"render\"](react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Popup__WEBPACK_IMPORTED_MODULE_2__[/* Popup */ \"a\"], {\n content: rootComponent,\n id: id,\n props: props,\n removePopup: () => {\n removePopup(id);\n if (onClose) onClose();\n }\n }), container);\n return container;\n}\n/**\n * Closes a popup created with the createPopup() function above\n */\n\nfunction removePopup(id) {\n const content = document.getElementById(`${id}`);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](content);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(id);\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(`${id}-close`);\n if (id === deepestPopupId) deepestPopupId = \"\";\n}\n\n//# sourceURL=webpack:///./src/ui/React/createPopup.tsx?"); /***/ }), /* 20 */ @@ -350,7 +350,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadFactions; });\n/* unused harmony export AddToFactions */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return factionExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initFactions; });\n/* unused harmony export resetFaction */\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FactionInfo */ 429);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\n\n\n\nlet Factions = {};\nfunction loadFactions(saveString) {\n Factions = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n}\nfunction AddToFactions(faction) {\n const name = faction.name;\n Factions[name] = faction;\n}\nfunction factionExists(name) {\n return Factions.hasOwnProperty(name);\n}\nfunction initFactions() {\n for (const name in _FactionInfo__WEBPACK_IMPORTED_MODULE_1__[/* FactionInfos */ \"a\"]) {\n resetFaction(new _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"](name));\n }\n} //Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\n\nfunction resetFaction(newFactionObject) {\n if (!(newFactionObject instanceof _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n\n const factionName = newFactionObject.name;\n\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n\n AddToFactions(newFactionObject);\n}\n\n//# sourceURL=webpack:///./src/Faction/Factions.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadFactions; });\n/* unused harmony export AddToFactions */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return factionExists; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initFactions; });\n/* unused harmony export resetFaction */\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./FactionInfo */ 430);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\n\n\n\nlet Factions = {};\nfunction loadFactions(saveString) {\n Factions = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"]);\n}\nfunction AddToFactions(faction) {\n const name = faction.name;\n Factions[name] = faction;\n}\nfunction factionExists(name) {\n return Factions.hasOwnProperty(name);\n}\nfunction initFactions() {\n for (const name in _FactionInfo__WEBPACK_IMPORTED_MODULE_1__[/* FactionInfos */ \"a\"]) {\n resetFaction(new _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"](name));\n }\n} //Resets a faction during (re-)initialization. Saves the favor in the new\n//Faction object and deletes the old Faction Object from \"Factions\". Then\n//reinserts the new Faction object\n\nfunction resetFaction(newFactionObject) {\n if (!(newFactionObject instanceof _Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n\n const factionName = newFactionObject.name;\n\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n\n AddToFactions(newFactionObject);\n}\n\n//# sourceURL=webpack:///./src/Faction/Factions.ts?"); /***/ }), /* 23 */ @@ -377,7 +377,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return SoftwareCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return ITCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return SecurityEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return NetworkEngineerCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BusinessCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return SecurityCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AgentCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return MiscCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return SoftwareConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BusinessConsultantCompanyPositions; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return PartTimeCompanyPositions; });\n// Defs for job titles, stored in arrays and categorized by job \"type\"\nconst SoftwareCompanyPositions = [\"Software Engineering Intern\", \"Junior Software Engineer\", \"Senior Software Engineer\", \"Lead Software Developer\", \"Head of Software\", \"Head of Engineering\", \"Vice President of Technology\", \"Chief Technology Officer\"];\nconst ITCompanyPositions = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\nconst SecurityEngineerCompanyPositions = [\"Security Engineer\"];\nconst NetworkEngineerCompanyPositions = [\"Network Engineer\", \"Network Administrator\"];\nconst BusinessCompanyPositions = [\"Business Intern\", \"Business Analyst\", \"Business Manager\", \"Operations Manager\", \"Chief Financial Officer\", \"Chief Executive Officer\"];\nconst SecurityCompanyPositions = [\"Police Officer\", \"Police Chief\", \"Security Guard\", \"Security Officer\", \"Security Supervisor\", \"Head of Security\"];\nconst AgentCompanyPositions = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\nconst MiscCompanyPositions = [\"Waiter\", \"Employee\"];\nconst SoftwareConsultantCompanyPositions = [\"Software Consultant\", \"Senior Software Consultant\"];\nconst BusinessConsultantCompanyPositions = [\"Business Consultant\", \"Senior Business Consultant\"];\nconst PartTimeCompanyPositions = [\"Part-time Waiter\", \"Part-time Employee\"];\n\n//# sourceURL=webpack:///./src/Company/data/companypositionnames.ts?"); /***/ }), -/* 25 */ +/* 25 */, +/* 26 */ /*!**************************!*\ !*** ./src/ui/Router.ts ***! \**************************/ @@ -389,7 +390,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Page; });\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nlet Page;\n/**\n * This class keeps track of player navigation/routing within the game.\n */\n\n(function (Page) {\n Page[Page[\"ActiveScripts\"] = 0] = \"ActiveScripts\";\n Page[Page[\"Augmentations\"] = 1] = \"Augmentations\";\n Page[Page[\"BitVerse\"] = 2] = \"BitVerse\";\n Page[Page[\"Bladeburner\"] = 3] = \"Bladeburner\";\n Page[Page[\"City\"] = 4] = \"City\";\n Page[Page[\"Corporation\"] = 5] = \"Corporation\";\n Page[Page[\"CreateProgram\"] = 6] = \"CreateProgram\";\n Page[Page[\"CreateScript\"] = 7] = \"CreateScript\";\n Page[Page[\"DevMenu\"] = 8] = \"DevMenu\";\n Page[Page[\"Faction\"] = 9] = \"Faction\";\n Page[Page[\"Factions\"] = 10] = \"Factions\";\n Page[Page[\"Gang\"] = 11] = \"Gang\";\n Page[Page[\"Hacknet\"] = 12] = \"Hacknet\";\n Page[Page[\"Infiltration\"] = 13] = \"Infiltration\";\n Page[Page[\"Job\"] = 14] = \"Job\";\n Page[Page[\"Milestones\"] = 15] = \"Milestones\";\n Page[Page[\"Options\"] = 16] = \"Options\";\n Page[Page[\"Resleeves\"] = 17] = \"Resleeves\";\n Page[Page[\"Sleeves\"] = 18] = \"Sleeves\";\n Page[Page[\"Stats\"] = 19] = \"Stats\";\n Page[Page[\"StockMarket\"] = 20] = \"StockMarket\";\n Page[Page[\"Terminal\"] = 21] = \"Terminal\";\n Page[Page[\"Travel\"] = 22] = \"Travel\";\n Page[Page[\"Tutorial\"] = 23] = \"Tutorial\";\n Page[Page[\"Work\"] = 24] = \"Work\";\n Page[Page[\"BladeburnerCinematic\"] = 25] = \"BladeburnerCinematic\";\n Page[Page[\"Location\"] = 26] = \"Location\";\n})(Page || (Page = {}));\n\n//# sourceURL=webpack:///./src/ui/Router.ts?"); /***/ }), -/* 26 */, /* 27 */, /* 28 */ /*!*******************************************!*\ @@ -474,7 +474,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return safetlyCreateUniqueServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return numCycleForGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return processSingleServerGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return prestigeHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GetServerByHostname; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getServerOnNetwork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isBackdoorInstalled; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _formulas_grow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/grow */ 433);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isValidNumber */ 521);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n\n\n\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\n\nfunction safetlyCreateUniqueServer(params) {\n if (params.ip != null && Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* ipExists */ \"e\"])(params.ip)) {\n params.ip = Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])();\n }\n\n if (GetServerByHostname(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname = params.hostname;\n\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n\n if (GetServerByHostname(hostname) == null) {\n break;\n }\n }\n\n params.hostname = hostname;\n }\n\n return new _Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"](params);\n}\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\n\nfunction numCycleForGrowth(server, growth, p) {\n let ajdGrowthRate = 1 + (_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate - 1) / server.hackDifficulty;\n\n if (ajdGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n ajdGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const cycles = Math.log(growth) / (Math.log(ajdGrowthRate) * p.hacking_grow_mult * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate);\n return cycles;\n} //Applied server growth for a single server. Returns the percentage growth\n\nfunction processSingleServerGrowth(server, threads, p, cores = 1) {\n let serverGrowth = Object(_formulas_grow__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerGrowth */ \"a\"])(server, threads, p, cores);\n\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable *= serverGrowth; // in case of data corruption\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n } // cap at max\n\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n } // if there was any growth at all, increase security\n\n\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p);\n usedCycles = Math.max(0, usedCycles);\n server.fortify(2 * _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.ceil(usedCycles));\n }\n\n return server.moneyAvailable / oldMoneyAvailable;\n}\nfunction prestigeHomeComputer(homeComp) {\n const hasBitflume = homeComp.programs.includes(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n homeComp.programs.length = 0; //Remove programs\n\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].NukeProgram.name);\n\n if (hasBitflume) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n } //Update RAM usage on all scripts\n\n\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n homeComp.messages.length = 0; //Remove .lit and .msg files\n\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n} //Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\n\nfunction GetServerByHostname(hostname) {\n for (const ip in _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"]) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"].hasOwnProperty(ip)) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip].hostname == hostname) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip];\n }\n }\n }\n\n return null;\n} //Get server by IP or hostname. Returns null if invalid\n\nfunction getServer(s) {\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__[/* isValidIPAddress */ \"a\"])(s)) {\n return GetServerByHostname(s);\n }\n\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s] !== undefined) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s];\n }\n\n return null;\n} // Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\n\nfunction getServerOnNetwork(server, i) {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][server.serversOnNetwork[i]];\n}\nfunction isBackdoorInstalled(server) {\n if (\"backdoorInstalled\" in server) {\n return server.backdoorInstalled;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Server/ServerHelpers.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return safetlyCreateUniqueServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return numCycleForGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return processSingleServerGrowth; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return prestigeHomeComputer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GetServerByHostname; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getServerOnNetwork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return isBackdoorInstalled; });\n/* harmony import */ var _AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AllServers */ 29);\n/* harmony import */ var _Server__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Server */ 92);\n/* harmony import */ var _formulas_grow__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/grow */ 434);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isValidNumber */ 521);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 435);\n\n\n\n\n\n\n\n\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\n\nfunction safetlyCreateUniqueServer(params) {\n if (params.ip != null && Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* ipExists */ \"e\"])(params.ip)) {\n params.ip = Object(_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* createUniqueRandomIp */ \"c\"])();\n }\n\n if (GetServerByHostname(params.hostname) != null) {\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n let hostname = params.hostname;\n\n for (let i = 0; i < 200; ++i) {\n hostname = `${params.hostname}-${i}`;\n\n if (GetServerByHostname(hostname) == null) {\n break;\n }\n }\n\n params.hostname = hostname;\n }\n\n return new _Server__WEBPACK_IMPORTED_MODULE_1__[/* Server */ \"a\"](params);\n}\n/**\n * Returns the number of \"growth cycles\" needed to grow the specified server by the\n * specified amount.\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, in DECIMAL form (e.g. 1.5 rather than 50)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\n\nfunction numCycleForGrowth(server, growth, p) {\n let ajdGrowthRate = 1 + (_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate - 1) / server.hackDifficulty;\n\n if (ajdGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n ajdGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const cycles = Math.log(growth) / (Math.log(ajdGrowthRate) * p.hacking_grow_mult * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate);\n return cycles;\n} //Applied server growth for a single server. Returns the percentage growth\n\nfunction processSingleServerGrowth(server, threads, p, cores = 1) {\n let serverGrowth = Object(_formulas_grow__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerGrowth */ \"a\"])(server, threads, p, cores);\n\n if (serverGrowth < 1) {\n console.warn(\"serverGrowth calculated to be less than 1\");\n serverGrowth = 1;\n }\n\n const oldMoneyAvailable = server.moneyAvailable;\n server.moneyAvailable *= serverGrowth; // in case of data corruption\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n } // cap at max\n\n\n if (Object(_utils_helpers_isValidNumber__WEBPACK_IMPORTED_MODULE_7__[/* isValidNumber */ \"a\"])(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n } // if there was any growth at all, increase security\n\n\n if (oldMoneyAvailable !== server.moneyAvailable) {\n //Growing increases server security twice as much as hacking\n let usedCycles = numCycleForGrowth(server, server.moneyAvailable / oldMoneyAvailable, p);\n usedCycles = Math.max(0, usedCycles);\n server.fortify(2 * _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.ceil(usedCycles));\n }\n\n return server.moneyAvailable / oldMoneyAvailable;\n}\nfunction prestigeHomeComputer(homeComp) {\n const hasBitflume = homeComp.programs.includes(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n homeComp.programs.length = 0; //Remove programs\n\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].NukeProgram.name);\n\n if (hasBitflume) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_5__[/* Programs */ \"a\"].BitFlume.name);\n } //Update RAM usage on all scripts\n\n\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(homeComp.scripts);\n });\n homeComp.messages.length = 0; //Remove .lit and .msg files\n\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_6__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n} //Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\n\nfunction GetServerByHostname(hostname) {\n for (const ip in _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"]) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"].hasOwnProperty(ip)) {\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip].hostname == hostname) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][ip];\n }\n }\n }\n\n return null;\n} //Get server by IP or hostname. Returns null if invalid\n\nfunction getServer(s) {\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_8__[/* isValidIPAddress */ \"a\"])(s)) {\n return GetServerByHostname(s);\n }\n\n if (_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s] !== undefined) {\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][s];\n }\n\n return null;\n} // Returns the i-th server on the specified server's network\n// A Server's serverOnNetwork property holds only the IPs. This function returns\n// the actual Server object\n\nfunction getServerOnNetwork(server, i) {\n if (i > server.serversOnNetwork.length) {\n console.error(\"Tried to get server on network that was out of range\");\n return null;\n }\n\n return _AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][server.serversOnNetwork[i]];\n}\nfunction isBackdoorInstalled(server) {\n if (\"backdoorInstalled\" in server) {\n return server.backdoorInstalled;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Server/ServerHelpers.ts?"); /***/ }), /* 37 */ @@ -561,7 +561,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return hasHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return purchaseHacknet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return hasMaxNumberHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getCostOfNextHacknetNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getCostOfNextHacknetServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getMaxNumberLevelUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return getMaxNumberRamUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getMaxNumberCoreUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getMaxNumberCacheUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return purchaseLevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return purchaseRamUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return purchaseCoreUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return purchaseCacheUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return processHacknetEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return updateHashManagerCapacity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return purchaseHashUpgrade; });\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 248);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 197);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _HacknetServer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetServer */ 84);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashManager */ 287);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HashUpgrades */ 216);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CodingContractGenerator */ 288);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Server/Server */ 92);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\n\n\n\n\n\n\n\n\n\n\n\n\n // Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\n\nfunction hasHacknetServers(player) {\n return player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__[/* SourceFileFlags */ \"a\"][9] > 0;\n}\nfunction purchaseHacknet(player) {\n /* INTERACTIVE TUTORIAL */\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].isRunning) {\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialSteps */ \"d\"].HacknetNodesIntroduction) {\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialNextStep */ \"b\"])();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n\n const numOwned = player.hacknetNodes.length;\n\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n player.loseMoney(cost);\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n } // Auto generate a name for the Node\n\n\n const name = \"hacknet-node-\" + numOwned;\n const node = new _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"](name, player.hacknet_node_money_mult);\n player.loseMoney(cost);\n player.hacknetNodes.push(node);\n return numOwned;\n }\n}\nfunction hasMaxNumberHacknetServers(player) {\n return hasHacknetServers(player) && player.hacknetNodes.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxServers;\n}\nfunction getCostOfNextHacknetNode(player) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateNodeCost */ \"d\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\nfunction getCostOfNextHacknetServer(player) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerCost */ \"f\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\n\nfunction getMaxNumberLevelUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n\n if (player.money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult))) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr !== maxLevel && player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) && player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\n\nfunction getMaxNumberRamUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult))) {\n return 0;\n }\n\n let levelsToMax;\n\n if (nodeObj instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult))) {\n return levelsToMax;\n } //We'll just loop until we find the max\n\n\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult))) {\n return i;\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\n\nfunction getMaxNumberCoreUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n\n if (player.money.gt(nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) && player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\n\nfunction getMaxNumberCacheUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) && !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\nfunction purchaseLevelUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // If we're at max level, return false\n\n if (node.level >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n return false;\n } // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n\n\n if (node.level + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseRamUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"] && node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return false;\n }\n\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"] && node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return false;\n } // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n if (node.ram * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCoreUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // Fail if we're already at max\n\n if (node.cores >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n return false;\n } // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n\n\n if (node.cores + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCacheUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n } // Fail if we're already at max\n\n\n if (node.cache + sanitizedLevels > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n const diff = Math.max(0, _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCache(sanitizedLevels);\n return true;\n}\nfunction processHacknetEarnings(player, numCycles) {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player, numCycles) {\n let total = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player, numCycles, nodeObj) {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player, numCycles) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should not be HacketNode`);\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"]) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hserver.totalHashesGenerated += h;\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n return hashes;\n}\n\nfunction updateHashManagerCapacity(player) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n const ip = nodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should be string but isn't`);\n const h = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n\n if (!(h instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\nfunction purchaseHashUpgrade(player, upgName, upgTarget) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return false;\n } // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n\n\n if (player.hashManager.upgrade(upgName)) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__[/* HashUpgrades */ \"a\"][upgName];\n\n switch (upgName) {\n case \"Sell for Money\":\n {\n player.gainMoney(upg.value);\n player.recordMoneySource(upg.value, \"hacknetnode\");\n break;\n }\n\n case \"Sell for Corporation Funds\":\n {\n // This will throw if player doesn't have a corporation\n try {\n player.corporation.funds = player.corporation.funds.plus(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Reduce Minimum Security\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Increase Maximum Money\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMaximumMoney(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Improve Studying\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Improve Gym Training\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Exchange for Corporation Research\":\n {\n // This will throw if player doesn't have a corporation\n try {\n for (const division of player.corporation.divisions) {\n division.sciResearch.qty += upg.value;\n }\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner Rank\":\n {\n // This will throw if player isnt in Bladeburner\n try {\n player.bladeburner.changeRank(player, upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner SP\":\n {\n // This will throw if player isn't in Bladeburner\n try {\n // As long as we don't change `Bladeburner.totalSkillPoints`, this\n // shouldn't affect anything else\n player.bladeburner.skillPoints += upg.value;\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Generate Coding Contract\":\n {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__[/* generateRandomContract */ \"b\"])();\n break;\n }\n\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetHelpers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return hasHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return purchaseHacknet; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return hasMaxNumberHacknetServers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getCostOfNextHacknetNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getCostOfNextHacknetServer; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return getMaxNumberLevelUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return getMaxNumberRamUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return getMaxNumberCoreUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getMaxNumberCacheUpgrades; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return purchaseLevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return purchaseRamUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return purchaseCoreUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return purchaseCacheUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return processHacknetEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return updateHashManagerCapacity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return purchaseHashUpgrade; });\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HacknetNode */ 248);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 198);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _HacknetServer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetServer */ 84);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashManager */ 288);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HashUpgrades */ 217);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../CodingContractGenerator */ 289);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Server/Server */ 92);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/**\n * Generic helper/utility functions for the Hacknet mechanic:\n * - Purchase nodes/upgrades\n * - Calculating maximum number of upgrades\n * - Processing Hacknet earnings\n * - Updating Hash Manager capacity\n * - Purchasing hash upgrades\n *\n * TODO Should probably split the different types of functions into their own modules\n */\n\n\n\n\n\n\n\n\n\n\n\n\n // Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\n\nfunction hasHacknetServers(player) {\n return player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_12__[/* SourceFileFlags */ \"a\"][9] > 0;\n}\nfunction purchaseHacknet(player) {\n /* INTERACTIVE TUTORIAL */\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].isRunning) {\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialSteps */ \"d\"].HacknetNodesIntroduction) {\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_8__[/* iTutorialNextStep */ \"b\"])();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n\n const numOwned = player.hacknetNodes.length;\n\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n }\n\n player.loseMoney(cost);\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\n\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetNode is NaN`);\n }\n\n if (!player.canAfford(cost)) {\n return -1;\n } // Auto generate a name for the Node\n\n\n const name = \"hacknet-node-\" + numOwned;\n const node = new _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"](name, player.hacknet_node_money_mult);\n player.loseMoney(cost);\n player.hacknetNodes.push(node);\n return numOwned;\n }\n}\nfunction hasMaxNumberHacknetServers(player) {\n return hasHacknetServers(player) && player.hacknetNodes.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxServers;\n}\nfunction getCostOfNextHacknetNode(player) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateNodeCost */ \"d\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\nfunction getCostOfNextHacknetServer(player) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_2__[/* calculateServerCost */ \"f\"])(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\n\nfunction getMaxNumberLevelUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateLevelUpgradeCost(1, player.hacknet_node_level_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.level;\n\n if (player.money.gt(nodeObj.calculateLevelUpgradeCost(levelsToMax, player.hacknet_node_level_cost_mult))) {\n return levelsToMax;\n }\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr !== maxLevel && player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) && player.money.lt(nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\n\nfunction getMaxNumberRamUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult))) {\n return 0;\n }\n\n let levelsToMax;\n\n if (nodeObj instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult))) {\n return levelsToMax;\n } //We'll just loop until we find the max\n\n\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money.gt(nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult))) {\n return i;\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\n\nfunction getMaxNumberCoreUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money.lt(nodeObj.calculateCoreUpgradeCost(1, player.hacknet_node_core_cost_mult))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cores;\n\n if (player.money.gt(nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) && player.money.lt(nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult))) {\n return Math.min(levelsToMax, curr);\n } else if (player.money.lt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n max = curr - 1;\n } else if (player.money.gt(nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n} // Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\n\nfunction getMaxNumberCacheUpgrades(player, nodeObj, maxLevel) {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCacheUpgrades() called without maxLevel arg`);\n }\n\n if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(1))) {\n return 0;\n }\n\n let min = 1;\n let max = maxLevel - 1;\n const levelsToMax = maxLevel - nodeObj.cache;\n\n if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n } // Use a binary search to find the max possible number of upgrades\n\n\n while (min <= max) {\n const curr = (min + max) / 2 | 0;\n\n if (curr != maxLevel && player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) && !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))) {\n return Math.min(levelsToMax, curr);\n } else if (!player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n max = curr - 1;\n } else if (player.canAfford(nodeObj.calculateCacheUpgradeCost(curr))) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n\n return 0;\n}\nfunction purchaseLevelUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // If we're at max level, return false\n\n if (node.level >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n return false;\n } // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n\n\n if (node.level + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxLevel : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxLevel) - node.level);\n return purchaseLevelUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseRamUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"] && node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n return false;\n }\n\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"] && node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return false;\n } // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n\n\n if (node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n if (node.ram * Math.pow(2, sanitizedLevels) > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram)));\n return purchaseRamUpgrade(player, node, diff);\n }\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCoreUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"]; // Fail if we're already at max\n\n if (node.cores >= (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n return false;\n } // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n\n\n if (node.cores + sanitizedLevels > (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores)) {\n const diff = Math.max(0, (isServer ? _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCores : _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetNodeConstants */ \"a\"].MaxCores) - node.cores);\n return purchaseCoreUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n return true;\n}\nfunction purchaseCacheUpgrade(player, node, levels = 1) {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n } // Fail if we're already at max\n\n\n if (node.cache + sanitizedLevels > _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n const diff = Math.max(0, _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache);\n return purchaseCacheUpgrade(player, node, diff);\n }\n\n if (!player.canAfford(cost)) {\n return false;\n }\n\n player.loseMoney(cost);\n node.upgradeCache(sanitizedLevels);\n return true;\n}\nfunction processHacknetEarnings(player, numCycles) {\n // Determine if player has Hacknet Nodes or Hacknet Servers, then\n // call the appropriate function\n if (player.hacknetNodes.length === 0) {\n return 0;\n }\n\n if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player, numCycles) {\n let total = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n const node = player.hacknetNodes[i];\n if (typeof node === \"string\") throw new Error(\"player node should not be ip string\");\n total += processSingleHacknetNodeEarnings(player, numCycles, node);\n }\n\n return total;\n}\n\nfunction processSingleHacknetNodeEarnings(player, numCycles, nodeObj) {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings);\n player.recordMoneySource(totalEarnings, \"hacknetnode\");\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player, numCycles) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\n\n for (let i = 0; i < player.hacknetNodes.length; ++i) {\n // hacknetNodes array only contains the IP addresses of the servers.\n // Also, update the hash rate before processing\n const ip = player.hacknetNodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should not be HacketNode`);\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"]) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hserver.totalHashesGenerated += h;\n hashes += h;\n }\n\n player.hashManager.storeHashes(hashes);\n return hashes;\n}\n\nfunction updateHashManagerCapacity(player) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n const ip = nodes[i];\n if (ip instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_0__[/* HacknetNode */ \"a\"]) throw new Error(`player nodes should be string but isn't`);\n const h = _Server_AllServers__WEBPACK_IMPORTED_MODULE_9__[/* AllServers */ \"b\"][ip];\n\n if (!(h instanceof _HacknetServer__WEBPACK_IMPORTED_MODULE_4__[/* HacknetServer */ \"a\"])) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\nfunction purchaseHashUpgrade(player, upgName, upgTarget) {\n if (!(player.hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_5__[/* HashManager */ \"a\"])) {\n console.error(`Player does not have a HashManager`);\n return false;\n } // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n\n\n if (player.hashManager.upgrade(upgName)) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_6__[/* HashUpgrades */ \"a\"][upgName];\n\n switch (upgName) {\n case \"Sell for Money\":\n {\n player.gainMoney(upg.value);\n player.recordMoneySource(upg.value, \"hacknetnode\");\n break;\n }\n\n case \"Sell for Corporation Funds\":\n {\n // This will throw if player doesn't have a corporation\n try {\n player.corporation.funds = player.corporation.funds.plus(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Reduce Minimum Security\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Increase Maximum Money\":\n {\n try {\n const target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_10__[/* GetServerByHostname */ \"a\"])(upgTarget);\n\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n\n if (!(target instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_11__[/* Server */ \"a\"])) throw new Error(`'${upgTarget}' is not a normal server.`);\n target.changeMaximumMoney(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Improve Studying\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Improve Gym Training\":\n {\n // Multiplier handled by HashManager\n break;\n }\n\n case \"Exchange for Corporation Research\":\n {\n // This will throw if player doesn't have a corporation\n try {\n for (const division of player.corporation.divisions) {\n division.sciResearch.qty += upg.value;\n }\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner Rank\":\n {\n // This will throw if player isnt in Bladeburner\n try {\n player.bladeburner.changeRank(player, upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Exchange for Bladeburner SP\":\n {\n // This will throw if player isn't in Bladeburner\n try {\n // As long as we don't change `Bladeburner.totalSkillPoints`, this\n // shouldn't affect anything else\n player.bladeburner.skillPoints += upg.value;\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n break;\n }\n\n case \"Generate Coding Contract\":\n {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_7__[/* generateRandomContract */ \"b\"])();\n break;\n }\n\n default:\n console.warn(`Unrecognized upgrade name ${upgName}. Upgrade has no effect`);\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n return true;\n }\n\n return false;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetHelpers.tsx?"); /***/ }), /* 47 */ @@ -586,7 +586,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return iTutorialSteps; });\n/* unused harmony export iTutorialEnd */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return iTutorialStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return iTutorialNextStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ITutorial; });\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n // Ordered array of keys to Interactive Tutorial Steps\n\nconst orderedITutorialSteps = [\"Start\", \"GoToCharacterPage\", // Click on 'Stats' page\n\"CharacterPage\", // Introduction to 'Stats' page\n\"CharacterGoToTerminalPage\", // Go back to Terminal\n\"TerminalIntro\", // Introduction to Terminal\n\"TerminalHelp\", // Using 'help' Terminal command\n\"TerminalLs\", // Using 'ls' Terminal command\n\"TerminalScan\", // Using 'scan' Terminal command\n\"TerminalScanAnalyze1\", // Using 'scan-analyze' Terminal command\n\"TerminalScanAnalyze2\", // Using 'scan-analyze 3' Terminal command\n\"TerminalConnect\", // Connecting to n00dles\n\"TerminalAnalyze\", // Analyzing n00dles\n\"TerminalNuke\", // NUKE n00dles\n\"TerminalManualHack\", // Hack n00dles\n\"TerminalHackingMechanics\", // Explanation of hacking mechanics\n\"TerminalCreateScript\", // Create a script using 'nano'\n\"TerminalTypeScript\", // Script Editor page - Type script and then save & close\n\"TerminalFree\", // Using 'Free' Terminal command\n\"TerminalRunScript\", // Running script using 'run' Terminal command\n\"TerminalGoToActiveScriptsPage\", \"ActiveScriptsPage\", \"ActiveScriptsToTerminal\", \"TerminalTailScript\", \"GoToHacknetNodesPage\", \"HacknetNodesIntroduction\", \"HacknetNodesGoToWorldPage\", \"WorldDescription\", \"TutorialPageInfo\", \"End\"]; // Create an 'enum' for the Steps\n\nconst iTutorialSteps = {};\n\nfor (let i = 0; i < orderedITutorialSteps.length; ++i) {\n iTutorialSteps[orderedITutorialSteps[i]] = i;\n}\n\nconst ITutorial = {\n currStep: 0,\n // iTutorialSteps.Start\n isRunning: false,\n // Keeps track of whether each step has been done\n stepIsDone: {}\n};\n\nfunction iTutorialStart() {\n // Initialize Interactive Tutorial state by settings 'done' for each state to false\n ITutorial.stepIsDone = {};\n\n for (let i = 0; i < orderedITutorialSteps.length; ++i) {\n ITutorial.stepIsDone[i] = false;\n } // Don't autosave during this interactive tutorial\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n ITutorial.currStep = 0;\n ITutorial.isRunning = true;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"block\"; // Exit tutorial button\n\n const exitButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-exit\");\n exitButton.addEventListener(\"click\", function () {\n iTutorialEnd();\n return false;\n }); // Back button\n\n const backButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-back\");\n backButton.addEventListener(\"click\", function () {\n iTutorialPrevStep();\n return false;\n }); // Next button\n\n const nextButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-next\");\n nextButton.addEventListener(\"click\", function () {\n iTutorialNextStep();\n return false;\n });\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEvaluateStep() {\n if (!ITutorial.isRunning) {\n return;\n } // Disable and clear main menu\n // const terminalMainMenu = clearEventListeners(\"terminal-menu-link\");\n // const statsMainMenu = clearEventListeners(\"stats-menu-link\");\n // const activeScriptsMainMenu = clearEventListeners(\"active-scripts-menu-link\");\n // const hacknetMainMenu = clearEventListeners(\"hacknet-nodes-menu-link\");\n // const cityMainMenu = clearEventListeners(\"city-menu-link\");\n // const tutorialMainMenu = clearEventListeners(\"tutorial-menu-link\");\n // terminalMainMenu.removeAttribute(\"class\");\n // statsMainMenu.removeAttribute(\"class\");\n // activeScriptsMainMenu.removeAttribute(\"class\");\n // hacknetMainMenu.removeAttribute(\"class\");\n // cityMainMenu.removeAttribute(\"class\");\n // tutorialMainMenu.removeAttribute(\"class\");\n // Interactive Tutorial Next button\n\n\n const nextBtn = document.getElementById(\"interactive-tutorial-next\");\n\n switch (ITutorial.currStep) {\n case iTutorialSteps.Start:\n iTutorialSetText(\"Welcome to Bitburner, a cyberpunk-themed incremental RPG! \" + \"The game takes place in a dark, dystopian future... The year is 2077...

\" + \"This tutorial will show you the basics of the game. \" + \"You may skip the tutorial at any time.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToCharacterPage:\n iTutorialSetText(\"Let's start by heading to the Stats page. Click the Stats tab on \" + \"the main navigation menu (left-hand side of the screen)\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.CharacterPage:\n iTutorialSetText(\"The Stats page shows a lot of important information about your progress, \" + \"such as your skills, money, and bonuses. \");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.CharacterGoToTerminalPage:\n iTutorialSetText(\"Let's head to your computer's terminal by clicking the Terminal tab on the \" + \"main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TerminalIntro:\n iTutorialSetText(\"The Terminal is used to interface with your home computer as well as \" + \"all of the other machines around the world.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalHelp:\n iTutorialSetText(\"Let's try it out. Start by entering the help command into the Terminal \" + \"(Don't forget to press Enter after typing the command)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalLs:\n iTutorialSetText(\"The help command displays a list of all available Terminal commands, how to use them, \" + \"and a description of what they do.

Let's try another command. Enter the ls command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScan:\n iTutorialSetText(\" ls is a basic command that shows files \" + \"on the computer. Right now, it shows that you have a program called NUKE.exe on your computer. \" + \"We'll get to what this does later.

Using your home computer's terminal, you can connect \" + \"to other machines throughout the world. Let's do that now by first entering \" + \"the scan command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze1:\n iTutorialSetText(\"The scan command shows all available network connections. In other words, \" + \"it displays a list of all servers that can be connected to from your \" + \"current machine. A server is identified by its hostname.

\" + \"That's great and all, but there's so many servers. Which one should you go to? \" + \"The scan-analyze command gives some more detailed information about servers on the \" + \"network. Try it now!\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze2:\n iTutorialSetText(\"You just ran scan-analyze with a depth of one. This command shows more detailed \" + \"information about each server that you can connect to (servers that are a distance of \" + \"one node away).

It is also possible to run scan-analyze with \" + \"a higher depth. Let's try a depth of two with the following command: scan-analyze 2.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalConnect:\n iTutorialSetText(\"Now you can see information about all servers that are up to two nodes away, as well \" + \"as figure out how to navigate to those servers through the network. You can only connect to \" + \"a server that is one node away. To connect to a machine, use the connect [hostname] command.

\" + \"From the results of the scan-analyze command, we can see that the n00dles server is \" + \"only one node away. Let's connect so it now using: connect n00dles\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalAnalyze:\n iTutorialSetText(\"You are now connected to another machine! What can you do now? You can hack it!

In the year 2077, currency has \" + \"become digital and decentralized. People and corporations store their money \" + \"on servers and computers. Using your hacking abilities, you can hack servers \" + \"to steal money and gain experience.

\" + \"Before you try to hack a server, you should run diagnostics using the analyze command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalNuke:\n iTutorialSetText(\"When the analyze command finishes running it will show useful information \" + \"about hacking the server.

For this server, the required hacking skill is only 1, \" + \"which means you can hack it right now. However, in order to hack a server \" + \"you must first gain root access. The NUKE.exe program that we saw earlier on your \" + \"home computer is a virus that will grant you root access to a machine if there are enough \" + \"open ports.

The analyze results shows that there do not need to be any open ports \" + \"on this machine for the NUKE virus to work, so go ahead and run the virus using the \" + \"run NUKE.exe command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalManualHack:\n iTutorialSetText(\"You now have root access! You can hack the server using the hack command. \" + \"Try doing that now.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalHackingMechanics:\n iTutorialSetText(\"You are now attempting to hack the server. Performing a hack takes time and \" + \"only has a certain percentage chance \" + \"of success. This time and success chance is determined by a variety of factors, including \" + \"your hacking skill and the server's security level.

\" + \"If your attempt to hack the server is successful, you will steal a certain percentage \" + \"of the server's total money. This percentage is affected by your hacking skill and \" + \"the server's security level.

The amount of money on a server is not limitless. So, if \" + \"you constantly hack a server and deplete its money, then you will encounter \" + \"diminishing returns in your hacking.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalCreateScript:\n iTutorialSetText(\"Hacking is the core mechanic of the game and is necessary for progressing. However, \" + \"you don't want to be hacking manually the entire time. You can automate your hacking \" + \"by writing scripts!

To create a new script or edit an existing one, you can use the nano \" + \"command. Scripts must end with the .script extension. Let's make a script now by \" + \"entering nano n00dles.script after the hack command finishes running (Sidenote: Pressing ctrl + c\" + \" will end a command like hack early)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTypeScript:\n iTutorialSetText(\"This is the script editor. You can use it to program your scripts. Scripts are \" + \"written in a simplified version of javascript. Copy and paste the following code into the script editor:

\" + \"
\" + \"while(true) {\\n\" + \"  hack('n00dles');\\n\" + \"}
\" + \"For anyone with basic programming experience, this code should be straightforward. \" + \"This script will continuously hack the n00dles server.

\" + \"To save and close the script editor, press the button in the bottom left, or press ctrl + b.\");\n nextBtn.style.display = \"none\"; // next step triggered in saveAndCloseScriptEditor() (Script.js)\n\n break;\n\n case iTutorialSteps.TerminalFree:\n iTutorialSetText(\"Now we'll run the script. Scripts require a certain amount of RAM to run, and can be \" + \"run on any machine which you have root access to. Different servers have different \" + \"amounts of RAM. You can also purchase more RAM for your home server.

To check how much \" + \"RAM is available on this machine, enter the free command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalRunScript:\n iTutorialSetText(\"We have 4GB of free RAM on this machine, which is enough to run our \" + \"script. Let's run our script using run n00dles.script.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalGoToActiveScriptsPage:\n iTutorialSetText(\"Your script is now running! \" + \"It will continuously run in the background and will automatically stop if \" + \"the code ever completes (the n00dles.script will never complete because it \" + \"runs an infinite loop).

These scripts can passively earn you income and hacking experience. \" + \"Your scripts will also earn money and experience while you are offline, although at a \" + \"slightly slower rate.

\" + \"Let's check out some statistics for our running scripts by clicking the \" + \"Active Scripts link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsPage:\n iTutorialSetText(\"This page displays information about all of your scripts that are \" + \"running across every server. You can use this to gauge how well \" + \"your scripts are doing. Let's go back to the Terminal\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsToTerminal:\n iTutorialSetText(\"One last thing about scripts, each active script contains logs that detail \" + \"what it's doing. We can check these logs using the tail command. Do that \" + \"now for the script we just ran by typing tail n00dles.script\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTailScript:\n iTutorialSetText(\"The log for this script won't show much right now (it might show nothing at all) because it \" + \"just started running...but check back again in a few minutes!

\" + \"This covers the basics of hacking. To learn more about writing \" + \"scripts, select the Tutorial link in the \" + \"main navigation menu to look at the documentation. \" + \"If you are an experienced JavaScript \" + \"developer, I would highly suggest you check out the section on \" + \"NetscriptJS/Netscript 2.0, it's faster and more powerful.

For now, let's move on to something else!\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToHacknetNodesPage:\n iTutorialSetText(\"Hacking is not the only way to earn money. One other way to passively \" + \"earn money is by purchasing and upgrading Hacknet Nodes. Let's go to \" + \"the Hacknet page through the main navigation menu now.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.HacknetNodesIntroduction:\n iTutorialSetText(\"here you can purchase new Hacknet Nodes and upgrade your \" + \"existing ones. Let's purchase a new one now.\");\n nextBtn.style.display = \"none\"; // Next step triggered by purchaseHacknet() (HacknetNode.js)\n\n break;\n\n case iTutorialSteps.HacknetNodesGoToWorldPage:\n iTutorialSetText(\"You just purchased a Hacknet Node! This Hacknet Node will passively \" + \"earn you money over time, both online and offline. When you get enough \" + \" money, you can upgrade \" + \"your newly-purchased Hacknet Node below.

\" + \"Let's go to the City page through the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.WorldDescription:\n iTutorialSetText(\"This page lists all of the different locations you can currently \" + \"travel to. Each location has something that you can do. \" + \"There's a lot of content out in the world, make sure \" + \"you explore and discover!

\" + \"Lastly, click on the Tutorial link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TutorialPageInfo:\n iTutorialSetText(\"This page contains a lot of different documentation about the game's \" + \"content and mechanics. I know it's a lot, but I highly suggest you read \" + \"(or at least skim) through this before you start playing. That's the end of the tutorial. \" + \"Hope you enjoy the game!\");\n nextBtn.style.display = \"inline-block\";\n nextBtn.innerHTML = \"Finish Tutorial\";\n break;\n\n case iTutorialSteps.End:\n iTutorialEnd();\n break;\n\n default:\n throw new Error(\"Invalid tutorial step\");\n }\n\n if (ITutorial.stepIsDone[ITutorial.currStep] === true) {\n nextBtn.style.display = \"inline-block\";\n }\n} // Go to the next step and evaluate it\n\n\nfunction iTutorialNextStep() {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n\n iTutorialEvaluateStep();\n} // Go to previous step and evaluate\n\n\nfunction iTutorialPrevStep() {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEnd() {\n // Re-enable auto save\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n } else {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval * 5;\n }\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].init();\n ITutorial.currStep = iTutorialSteps.End;\n ITutorial.isRunning = false;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"none\"; // Create a popup with final introductory stuff\n\n const popupId = \"interactive-tutorial-ending-popup\";\n const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: \"If you are new to the game, the following links may be useful for you!

\" + \"Getting Started Guide\" + \"Documentation

\" + \"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. \" + \"To read it, go to Terminal and enter

cat \" + _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook\n });\n const gotitBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n float: \"right\",\n padding: \"6px\",\n innerText: \"Got it!\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__[/* removeElementById */ \"a\"])(popupId);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, [txt, gotitBtn]);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n}\n\nlet textBox = null;\n\n(function () {\n function set() {\n textBox = document.getElementById(\"interactive-tutorial-text\");\n document.removeEventListener(\"DOMContentLoaded\", set);\n }\n\n document.addEventListener(\"DOMContentLoaded\", set);\n})();\n\nfunction iTutorialSetText(txt) {\n textBox.innerHTML = txt;\n textBox.parentElement.scrollTop = 0; // this resets scroll position\n}\n\n\n\n//# sourceURL=webpack:///./src/InteractiveTutorial.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return iTutorialSteps; });\n/* unused harmony export iTutorialEnd */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return iTutorialStart; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return iTutorialNextStep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ITutorial; });\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 436);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 212);\n\n\n\n\n\n\n\n // Ordered array of keys to Interactive Tutorial Steps\n\nconst orderedITutorialSteps = [\"Start\", \"GoToCharacterPage\", // Click on 'Stats' page\n\"CharacterPage\", // Introduction to 'Stats' page\n\"CharacterGoToTerminalPage\", // Go back to Terminal\n\"TerminalIntro\", // Introduction to Terminal\n\"TerminalHelp\", // Using 'help' Terminal command\n\"TerminalLs\", // Using 'ls' Terminal command\n\"TerminalScan\", // Using 'scan' Terminal command\n\"TerminalScanAnalyze1\", // Using 'scan-analyze' Terminal command\n\"TerminalScanAnalyze2\", // Using 'scan-analyze 3' Terminal command\n\"TerminalConnect\", // Connecting to n00dles\n\"TerminalAnalyze\", // Analyzing n00dles\n\"TerminalNuke\", // NUKE n00dles\n\"TerminalManualHack\", // Hack n00dles\n\"TerminalHackingMechanics\", // Explanation of hacking mechanics\n\"TerminalCreateScript\", // Create a script using 'nano'\n\"TerminalTypeScript\", // Script Editor page - Type script and then save & close\n\"TerminalFree\", // Using 'Free' Terminal command\n\"TerminalRunScript\", // Running script using 'run' Terminal command\n\"TerminalGoToActiveScriptsPage\", \"ActiveScriptsPage\", \"ActiveScriptsToTerminal\", \"TerminalTailScript\", \"GoToHacknetNodesPage\", \"HacknetNodesIntroduction\", \"HacknetNodesGoToWorldPage\", \"WorldDescription\", \"TutorialPageInfo\", \"End\"]; // Create an 'enum' for the Steps\n\nconst iTutorialSteps = {};\n\nfor (let i = 0; i < orderedITutorialSteps.length; ++i) {\n iTutorialSteps[orderedITutorialSteps[i]] = i;\n}\n\nconst ITutorial = {\n currStep: 0,\n // iTutorialSteps.Start\n isRunning: false,\n // Keeps track of whether each step has been done\n stepIsDone: {}\n};\n\nfunction iTutorialStart() {\n // Initialize Interactive Tutorial state by settings 'done' for each state to false\n ITutorial.stepIsDone = {};\n\n for (let i = 0; i < orderedITutorialSteps.length; ++i) {\n ITutorial.stepIsDone[i] = false;\n } // Don't autosave during this interactive tutorial\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n ITutorial.currStep = 0;\n ITutorial.isRunning = true;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"block\"; // Exit tutorial button\n\n const exitButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-exit\");\n exitButton.addEventListener(\"click\", function () {\n iTutorialEnd();\n return false;\n }); // Back button\n\n const backButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-back\");\n backButton.addEventListener(\"click\", function () {\n iTutorialPrevStep();\n return false;\n }); // Next button\n\n const nextButton = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_4__[/* clearEventListeners */ \"a\"])(\"interactive-tutorial-next\");\n nextButton.addEventListener(\"click\", function () {\n iTutorialNextStep();\n return false;\n });\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEvaluateStep() {\n if (!ITutorial.isRunning) {\n return;\n } // Disable and clear main menu\n // const terminalMainMenu = clearEventListeners(\"terminal-menu-link\");\n // const statsMainMenu = clearEventListeners(\"stats-menu-link\");\n // const activeScriptsMainMenu = clearEventListeners(\"active-scripts-menu-link\");\n // const hacknetMainMenu = clearEventListeners(\"hacknet-nodes-menu-link\");\n // const cityMainMenu = clearEventListeners(\"city-menu-link\");\n // const tutorialMainMenu = clearEventListeners(\"tutorial-menu-link\");\n // terminalMainMenu.removeAttribute(\"class\");\n // statsMainMenu.removeAttribute(\"class\");\n // activeScriptsMainMenu.removeAttribute(\"class\");\n // hacknetMainMenu.removeAttribute(\"class\");\n // cityMainMenu.removeAttribute(\"class\");\n // tutorialMainMenu.removeAttribute(\"class\");\n // Interactive Tutorial Next button\n\n\n const nextBtn = document.getElementById(\"interactive-tutorial-next\");\n\n switch (ITutorial.currStep) {\n case iTutorialSteps.Start:\n iTutorialSetText(\"Welcome to Bitburner, a cyberpunk-themed incremental RPG! \" + \"The game takes place in a dark, dystopian future... The year is 2077...

\" + \"This tutorial will show you the basics of the game. \" + \"You may skip the tutorial at any time.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToCharacterPage:\n iTutorialSetText(\"Let's start by heading to the Stats page. Click the Stats tab on \" + \"the main navigation menu (left-hand side of the screen)\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.CharacterPage:\n iTutorialSetText(\"The Stats page shows a lot of important information about your progress, \" + \"such as your skills, money, and bonuses. \");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.CharacterGoToTerminalPage:\n iTutorialSetText(\"Let's head to your computer's terminal by clicking the Terminal tab on the \" + \"main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TerminalIntro:\n iTutorialSetText(\"The Terminal is used to interface with your home computer as well as \" + \"all of the other machines around the world.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalHelp:\n iTutorialSetText(\"Let's try it out. Start by entering the help command into the Terminal \" + \"(Don't forget to press Enter after typing the command)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalLs:\n iTutorialSetText(\"The help command displays a list of all available Terminal commands, how to use them, \" + \"and a description of what they do.

Let's try another command. Enter the ls command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScan:\n iTutorialSetText(\" ls is a basic command that shows files \" + \"on the computer. Right now, it shows that you have a program called NUKE.exe on your computer. \" + \"We'll get to what this does later.

Using your home computer's terminal, you can connect \" + \"to other machines throughout the world. Let's do that now by first entering \" + \"the scan command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze1:\n iTutorialSetText(\"The scan command shows all available network connections. In other words, \" + \"it displays a list of all servers that can be connected to from your \" + \"current machine. A server is identified by its hostname.

\" + \"That's great and all, but there's so many servers. Which one should you go to? \" + \"The scan-analyze command gives some more detailed information about servers on the \" + \"network. Try it now!\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalScanAnalyze2:\n iTutorialSetText(\"You just ran scan-analyze with a depth of one. This command shows more detailed \" + \"information about each server that you can connect to (servers that are a distance of \" + \"one node away).

It is also possible to run scan-analyze with \" + \"a higher depth. Let's try a depth of two with the following command: scan-analyze 2.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalConnect:\n iTutorialSetText(\"Now you can see information about all servers that are up to two nodes away, as well \" + \"as figure out how to navigate to those servers through the network. You can only connect to \" + \"a server that is one node away. To connect to a machine, use the connect [hostname] command.

\" + \"From the results of the scan-analyze command, we can see that the n00dles server is \" + \"only one node away. Let's connect so it now using: connect n00dles\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalAnalyze:\n iTutorialSetText(\"You are now connected to another machine! What can you do now? You can hack it!

In the year 2077, currency has \" + \"become digital and decentralized. People and corporations store their money \" + \"on servers and computers. Using your hacking abilities, you can hack servers \" + \"to steal money and gain experience.

\" + \"Before you try to hack a server, you should run diagnostics using the analyze command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalNuke:\n iTutorialSetText(\"When the analyze command finishes running it will show useful information \" + \"about hacking the server.

For this server, the required hacking skill is only 1, \" + \"which means you can hack it right now. However, in order to hack a server \" + \"you must first gain root access. The NUKE.exe program that we saw earlier on your \" + \"home computer is a virus that will grant you root access to a machine if there are enough \" + \"open ports.

The analyze results shows that there do not need to be any open ports \" + \"on this machine for the NUKE virus to work, so go ahead and run the virus using the \" + \"run NUKE.exe command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalManualHack:\n iTutorialSetText(\"You now have root access! You can hack the server using the hack command. \" + \"Try doing that now.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalHackingMechanics:\n iTutorialSetText(\"You are now attempting to hack the server. Performing a hack takes time and \" + \"only has a certain percentage chance \" + \"of success. This time and success chance is determined by a variety of factors, including \" + \"your hacking skill and the server's security level.

\" + \"If your attempt to hack the server is successful, you will steal a certain percentage \" + \"of the server's total money. This percentage is affected by your hacking skill and \" + \"the server's security level.

The amount of money on a server is not limitless. So, if \" + \"you constantly hack a server and deplete its money, then you will encounter \" + \"diminishing returns in your hacking.\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.TerminalCreateScript:\n iTutorialSetText(\"Hacking is the core mechanic of the game and is necessary for progressing. However, \" + \"you don't want to be hacking manually the entire time. You can automate your hacking \" + \"by writing scripts!

To create a new script or edit an existing one, you can use the nano \" + \"command. Scripts must end with the .script extension. Let's make a script now by \" + \"entering nano n00dles.script after the hack command finishes running (Sidenote: Pressing ctrl + c\" + \" will end a command like hack early)\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTypeScript:\n iTutorialSetText(\"This is the script editor. You can use it to program your scripts. Scripts are \" + \"written in a simplified version of javascript. Copy and paste the following code into the script editor:

\" + \"
\" + \"while(true) {\\n\" + \"  hack('n00dles');\\n\" + \"}
\" + \"For anyone with basic programming experience, this code should be straightforward. \" + \"This script will continuously hack the n00dles server.

\" + \"To save and close the script editor, press the button in the bottom left, or press ctrl + b.\");\n nextBtn.style.display = \"none\"; // next step triggered in saveAndCloseScriptEditor() (Script.js)\n\n break;\n\n case iTutorialSteps.TerminalFree:\n iTutorialSetText(\"Now we'll run the script. Scripts require a certain amount of RAM to run, and can be \" + \"run on any machine which you have root access to. Different servers have different \" + \"amounts of RAM. You can also purchase more RAM for your home server.

To check how much \" + \"RAM is available on this machine, enter the free command.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalRunScript:\n iTutorialSetText(\"We have 4GB of free RAM on this machine, which is enough to run our \" + \"script. Let's run our script using run n00dles.script.\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal commmand\n\n break;\n\n case iTutorialSteps.TerminalGoToActiveScriptsPage:\n iTutorialSetText(\"Your script is now running! \" + \"It will continuously run in the background and will automatically stop if \" + \"the code ever completes (the n00dles.script will never complete because it \" + \"runs an infinite loop).

These scripts can passively earn you income and hacking experience. \" + \"Your scripts will also earn money and experience while you are offline, although at a \" + \"slightly slower rate.

\" + \"Let's check out some statistics for our running scripts by clicking the \" + \"Active Scripts link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsPage:\n iTutorialSetText(\"This page displays information about all of your scripts that are \" + \"running across every server. You can use this to gauge how well \" + \"your scripts are doing. Let's go back to the Terminal\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.ActiveScriptsToTerminal:\n iTutorialSetText(\"One last thing about scripts, each active script contains logs that detail \" + \"what it's doing. We can check these logs using the tail command. Do that \" + \"now for the script we just ran by typing tail n00dles.script\");\n nextBtn.style.display = \"none\"; // next step triggered by terminal command\n\n break;\n\n case iTutorialSteps.TerminalTailScript:\n iTutorialSetText(\"The log for this script won't show much right now (it might show nothing at all) because it \" + \"just started running...but check back again in a few minutes!

\" + \"This covers the basics of hacking. To learn more about writing \" + \"scripts, select the Tutorial link in the \" + \"main navigation menu to look at the documentation. \" + \"If you are an experienced JavaScript \" + \"developer, I would highly suggest you check out the section on \" + \"NetscriptJS/Netscript 2.0, it's faster and more powerful.

For now, let's move on to something else!\");\n nextBtn.style.display = \"inline-block\";\n break;\n\n case iTutorialSteps.GoToHacknetNodesPage:\n iTutorialSetText(\"Hacking is not the only way to earn money. One other way to passively \" + \"earn money is by purchasing and upgrading Hacknet Nodes. Let's go to \" + \"the Hacknet page through the main navigation menu now.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.HacknetNodesIntroduction:\n iTutorialSetText(\"here you can purchase new Hacknet Nodes and upgrade your \" + \"existing ones. Let's purchase a new one now.\");\n nextBtn.style.display = \"none\"; // Next step triggered by purchaseHacknet() (HacknetNode.js)\n\n break;\n\n case iTutorialSteps.HacknetNodesGoToWorldPage:\n iTutorialSetText(\"You just purchased a Hacknet Node! This Hacknet Node will passively \" + \"earn you money over time, both online and offline. When you get enough \" + \" money, you can upgrade \" + \"your newly-purchased Hacknet Node below.

\" + \"Let's go to the City page through the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.WorldDescription:\n iTutorialSetText(\"This page lists all of the different locations you can currently \" + \"travel to. Each location has something that you can do. \" + \"There's a lot of content out in the world, make sure \" + \"you explore and discover!

\" + \"Lastly, click on the Tutorial link in the main navigation menu.\");\n nextBtn.style.display = \"none\";\n break;\n\n case iTutorialSteps.TutorialPageInfo:\n iTutorialSetText(\"This page contains a lot of different documentation about the game's \" + \"content and mechanics. I know it's a lot, but I highly suggest you read \" + \"(or at least skim) through this before you start playing. That's the end of the tutorial. \" + \"Hope you enjoy the game!\");\n nextBtn.style.display = \"inline-block\";\n nextBtn.innerHTML = \"Finish Tutorial\";\n break;\n\n case iTutorialSteps.End:\n iTutorialEnd();\n break;\n\n default:\n throw new Error(\"Invalid tutorial step\");\n }\n\n if (ITutorial.stepIsDone[ITutorial.currStep] === true) {\n nextBtn.style.display = \"inline-block\";\n }\n} // Go to the next step and evaluate it\n\n\nfunction iTutorialNextStep() {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n\n iTutorialEvaluateStep();\n} // Go to previous step and evaluate\n\n\nfunction iTutorialPrevStep() {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n\n iTutorialEvaluateStep();\n}\n\nfunction iTutorialEnd() {\n // Re-enable auto save\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = Infinity;\n } else {\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].AutosaveInterval * 5;\n }\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].init();\n ITutorial.currStep = iTutorialSteps.End;\n ITutorial.isRunning = false;\n document.getElementById(\"interactive-tutorial-container\").style.display = \"none\"; // Create a popup with final introductory stuff\n\n const popupId = \"interactive-tutorial-ending-popup\";\n const txt = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: \"If you are new to the game, the following links may be useful for you!

\" + \"Getting Started Guide\" + \"Documentation

\" + \"The Beginner's Guide to Hacking was added to your home computer! It contains some tips/pointers for starting out with the game. \" + \"To read it, go to Terminal and enter

cat \" + _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook\n });\n const gotitBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_5__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n float: \"right\",\n padding: \"6px\",\n innerText: \"Got it!\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_7__[/* removeElementById */ \"a\"])(popupId);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, [txt, gotitBtn]);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_3__[/* LiteratureNames */ \"a\"].HackersStartingHandbook);\n}\n\nlet textBox = null;\n\n(function () {\n function set() {\n textBox = document.getElementById(\"interactive-tutorial-text\");\n document.removeEventListener(\"DOMContentLoaded\", set);\n }\n\n document.addEventListener(\"DOMContentLoaded\", set);\n})();\n\nfunction iTutorialSetText(txt) {\n textBox.innerHTML = txt;\n textBox.parentElement.scrollTop = 0; // this resets scroll position\n}\n\n\n\n//# sourceURL=webpack:///./src/InteractiveTutorial.js?"); /***/ }), /* 50 */ @@ -634,7 +634,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return NewIndustry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return NewCity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return UnlockUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return LevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return IssueDividends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return SellMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return SellProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return SetSmartSupply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return SetSmartSupplyUseLeftovers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BuyMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AssignJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return UpgradeOfficeSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"w\", function() { return ThrowParty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return PurchaseWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"z\", function() { return UpgradeWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BuyCoffee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return HireAdVert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return MakeProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return Research; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CancelExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return LimitProductProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return SetMaterialMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return SetMaterialMarketTA2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return SetProductMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return SetProductMarketTA2; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Industry */ 698);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Locations/Cities */ 104);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ResearchMap */ 284);\n\n\n\n\n\n\n\n\n\n\nfunction NewIndustry(corporation, industry, name) {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryStartingCosts */ \"d\"][industry];\n\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds.minus(cost);\n corporation.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__[/* Industry */ \"a\"]({\n corp: corporation,\n name: name,\n type: industry\n }));\n }\n}\nfunction NewCity(corporation, division, city) {\n if (corporation.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost)) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost);\n division.offices[city] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__[/* OfficeSpace */ \"a\"]({\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n });\n }\n}\nfunction UnlockUpgrade(corporation, upgrade) {\n if (corporation.funds.lt(upgrade[1])) {\n throw new Error(\"Insufficient funds\");\n }\n\n corporation.unlock(upgrade);\n}\nfunction LevelUpgrade(corporation, upgrade) {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\nfunction IssueDividends(corporation, percent) {\n if (isNaN(percent) || percent < 0 || percent > _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\nfunction SellMaterial(mat, amt, price) {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MP]/g, \"\"); //Sanitize cost\n\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n } //Parse quantity\n\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n\n if (isNaN(q)) {\n q = 0;\n }\n\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\nfunction SellProduct(product, city, amt, price, all) {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n\n product.sCost = cost;\n } // Array of all cities. Used later\n\n\n const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__[/* Cities */ \"a\"]); // Parse quantity\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n\n if (isNaN(qty)) {\n qty = 0;\n }\n\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\nfunction SetSmartSupply(warehouse, smartSupply) {\n warehouse.smartSupplyEnabled = smartSupply;\n}\nfunction SetSmartSupplyUseLeftovers(warehouse, material, useLeftover) {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name)) throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\nfunction BuyMaterial(material, amt) {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n\n material.buy = amt;\n}\nfunction AssignJob(employee, job) {\n if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__[/* EmployeePositions */ \"a\"]).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\nfunction UpgradeOfficeSize(corp, office, size) {\n const initialPriceMult = Math.round(office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09; // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const cost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n if (corp.funds.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\nfunction ThrowParty(corp, office, costPerEmployee) {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(totalCost);\n let mult = 0;\n\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\nfunction PurchaseWarehouse(corp, division, city) {\n if (corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)) return;\n if (division.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) return;\n division.warehouses[city] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]({\n corp: corp,\n industry: division,\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n });\n corp.funds = corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost);\n}\nfunction UpgradeWarehouse(corp, division, warehouse) {\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds.minus(sizeUpgradeCost);\n}\nfunction BuyCoffee(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction HireAdVert(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction MakeProduct(corp, division, city, productName, designInvest, marketingInvest) {\n if (designInvest < 0) {\n designInvest = 0;\n }\n\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n\n if (corp.funds.lt(designInvest + marketingInvest)) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n\n const product = new _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]({\n name: productName.replace(/[<>]/g, \"\"),\n //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest\n });\n\n if (division.products[product.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds.minus(designInvest + marketingInvest);\n division.products[product.name] = product;\n}\nfunction Research(division, researchName) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryResearchTrees */ \"c\"][division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__[/* ResearchMap */ \"a\"][researchName];\n if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost; // Get the Node from the Research Tree and set its 'researched' property\n\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\nfunction ExportMaterial(divisionName, cityName, material, amt) {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\");\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n const exportObj = {\n ind: divisionName,\n city: cityName,\n amt: sanitizedAmt\n };\n material.exp.push(exportObj);\n}\nfunction CancelExportMaterial(divisionName, cityName, material, amt) {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt) continue;\n material.exp.splice(i, 1);\n break;\n }\n}\nfunction LimitProductProduction(product, cityName, qty) {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\nfunction SetMaterialMarketTA1(material, on) {\n material.marketTa1 = on;\n}\nfunction SetMaterialMarketTA2(material, on) {\n material.marketTa2 = on;\n}\nfunction SetProductMarketTA1(product, on) {\n product.marketTa1 = on;\n}\nfunction SetProductMarketTA2(product, on) {\n product.marketTa2 = on;\n}\n\n//# sourceURL=webpack:///./src/Corporation/Actions.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"l\", function() { return NewIndustry; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return NewCity; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"x\", function() { return UnlockUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return LevelUpgrade; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return IssueDividends; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"o\", function() { return SellMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"p\", function() { return SellProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"u\", function() { return SetSmartSupply; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"v\", function() { return SetSmartSupplyUseLeftovers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return BuyMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AssignJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"y\", function() { return UpgradeOfficeSize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"w\", function() { return ThrowParty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"m\", function() { return PurchaseWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"z\", function() { return UpgradeWarehouse; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return BuyCoffee; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return HireAdVert; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return MakeProduct; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"n\", function() { return Research; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return ExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return CancelExportMaterial; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return LimitProductProduction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"q\", function() { return SetMaterialMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"r\", function() { return SetMaterialMarketTA2; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"s\", function() { return SetProductMarketTA1; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"t\", function() { return SetProductMarketTA2; });\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _Industry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Industry */ 698);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OfficeSpace */ 290);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Product */ 314);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Locations/Cities */ 105);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./IndustryUpgrades */ 291);\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ResearchMap */ 285);\n\n\n\n\n\n\n\n\n\n\nfunction NewIndustry(corporation, industry, name) {\n for (let i = 0; i < corporation.divisions.length; ++i) {\n if (corporation.divisions[i].name === name) {\n throw new Error(\"This division name is already in use!\");\n return;\n }\n }\n\n const cost = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryStartingCosts */ \"d\"][industry];\n\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Not enough money to create a new division in this industry\");\n } else if (name === \"\") {\n throw new Error(\"New division must have a name!\");\n } else {\n corporation.funds = corporation.funds.minus(cost);\n corporation.divisions.push(new _Industry__WEBPACK_IMPORTED_MODULE_1__[/* Industry */ \"a\"]({\n corp: corporation,\n name: name,\n type: industry\n }));\n }\n}\nfunction NewCity(corporation, division, city) {\n if (corporation.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost)) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost);\n division.offices[city] = new _OfficeSpace__WEBPACK_IMPORTED_MODULE_3__[/* OfficeSpace */ \"a\"]({\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n });\n }\n}\nfunction UnlockUpgrade(corporation, upgrade) {\n if (corporation.funds.lt(upgrade[1])) {\n throw new Error(\"Insufficient funds\");\n }\n\n corporation.unlock(upgrade);\n}\nfunction LevelUpgrade(corporation, upgrade) {\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgrade[0]];\n const cost = baseCost * Math.pow(priceMult, level);\n\n if (corporation.funds.lt(cost)) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\nfunction IssueDividends(corporation, percent) {\n if (isNaN(percent) || percent < 0 || percent > _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\nfunction SellMaterial(mat, amt, price) {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MP]/g, \"\"); //Sanitize cost\n\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (cost.includes(\"MP\")) {\n mat.sCost = cost; //Dynamically evaluated\n } else {\n mat.sCost = temp;\n } //Parse quantity\n\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n let q = amt.replace(/\\s+/g, \"\");\n q = q.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let tempQty = q.replace(/MAX/g, \"1\");\n tempQty = tempQty.replace(/PROD/g, \"1\");\n\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n\n if (isNaN(q)) {\n q = 0;\n }\n\n if (q === 0) {\n mat.sllman[0] = false;\n mat.sllman[1] = 0;\n } else {\n mat.sllman[0] = true;\n mat.sllman[1] = q;\n }\n }\n}\nfunction SellProduct(product, city, amt, price, all) {\n //Parse price\n if (price.includes(\"MP\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n //Sanitize input, then replace dynamic variables with arbitrary numbers\n price = price.replace(/\\s+/g, \"\");\n price = price.replace(/[^-()\\d/*+.MP]/g, \"\");\n let temp = price.replace(/MP/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell quantity field.\");\n }\n\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n\n product.sCost = cost;\n } // Array of all cities. Used later\n\n\n const cities = Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_6__[/* Cities */ \"a\"]); // Parse quantity\n\n if (amt.includes(\"MAX\") || amt.includes(\"PROD\")) {\n //Dynamically evaluated quantity. First test to make sure its valid\n let qty = amt.replace(/\\s+/g, \"\");\n qty = qty.replace(/[^-()\\d/*+.MAXPROD]/g, \"\");\n let temp = qty.replace(/MAX/g, \"1\");\n temp = temp.replace(/PROD/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n\n if (temp == null || isNaN(parseFloat(temp))) {\n throw new Error(\"Invalid value or expression for sell price field\");\n }\n\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty; //Use sanitized input\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty; //Use sanitized input\n }\n } else if (isNaN(parseFloat(amt))) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric\");\n } else {\n let qty = parseFloat(amt);\n\n if (isNaN(qty)) {\n qty = 0;\n }\n\n if (qty === 0) {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = false;\n product.sllman[tempCity][1] = \"\";\n }\n } else {\n product.sllman[city][0] = false;\n product.sllman[city][1] = \"\";\n }\n } else {\n if (all) {\n for (let i = 0; i < cities.length; ++i) {\n const tempCity = cities[i];\n product.sllman[tempCity][0] = true;\n product.sllman[tempCity][1] = qty;\n }\n } else {\n product.sllman[city][0] = true;\n product.sllman[city][1] = qty;\n }\n }\n }\n}\nfunction SetSmartSupply(warehouse, smartSupply) {\n warehouse.smartSupplyEnabled = smartSupply;\n}\nfunction SetSmartSupplyUseLeftovers(warehouse, material, useLeftover) {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name)) throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name] = useLeftover;\n}\nfunction BuyMaterial(material, amt) {\n if (isNaN(amt)) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n\n material.buy = amt;\n}\nfunction AssignJob(employee, job) {\n if (!Object.values(_EmployeePositions__WEBPACK_IMPORTED_MODULE_7__[/* EmployeePositions */ \"a\"]).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\nfunction UpgradeOfficeSize(corp, office, size) {\n const initialPriceMult = Math.round(office.size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize);\n const costMultiplier = 1.09; // Calculate cost to upgrade size by 15 employees\n\n let mult = 0;\n\n for (let i = 0; i < size / _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n\n const cost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].OfficeInitialCost * mult;\n if (corp.funds.lt(cost)) return;\n office.size += size;\n corp.funds = corp.funds.minus(cost);\n}\nfunction ThrowParty(corp, office, costPerEmployee) {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds.lt(totalCost)) return 0;\n corp.funds = corp.funds.minus(totalCost);\n let mult = 0;\n\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\nfunction PurchaseWarehouse(corp, division, city) {\n if (corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)) return;\n if (division.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) return;\n division.warehouses[city] = new _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]({\n corp: corp,\n industry: division,\n loc: city,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n });\n corp.funds = corp.funds.minus(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseInitialCost);\n}\nfunction UpgradeWarehouse(corp, division, warehouse) {\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds.minus(sizeUpgradeCost);\n}\nfunction BuyCoffee(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction HireAdVert(corp, division, office) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_8__[/* IndustryUpgrades */ \"a\"][1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds.lt(cost)) return;\n corp.funds = corp.funds.minus(cost);\n division.upgrade(upgrade, {\n corporation: corp,\n office: office\n });\n}\nfunction MakeProduct(corp, division, city, productName, designInvest, marketingInvest) {\n if (designInvest < 0) {\n designInvest = 0;\n }\n\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n\n if (corp.funds.lt(designInvest + marketingInvest)) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n\n const product = new _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]({\n name: productName.replace(/[<>]/g, \"\"),\n //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest\n });\n\n if (division.products[product.name] instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds.minus(designInvest + marketingInvest);\n division.products[product.name] = product;\n}\nfunction Research(division, researchName) {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_0__[/* IndustryResearchTrees */ \"c\"][division.type];\n if (researchTree === undefined) throw new Error(`No research tree for industry '${division.type}'`);\n const allResearch = researchTree.getAllNodes();\n if (!allResearch.includes(researchName)) throw new Error(`No research named '${researchName}'`);\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_9__[/* ResearchMap */ \"a\"][researchName];\n if (division.sciResearch.qty < research.cost) throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost; // Get the Node from the Research Tree and set its 'researched' property\n\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\nfunction ExportMaterial(divisionName, cityName, material, amt) {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\");\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\n\n try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid expression entered for export amount: \" + e);\n }\n\n const n = parseFloat(temp);\n\n if (n == null || isNaN(n) || n < 0) {\n throw new Error(\"Invalid amount entered for export\");\n }\n\n const exportObj = {\n ind: divisionName,\n city: cityName,\n amt: sanitizedAmt\n };\n material.exp.push(exportObj);\n}\nfunction CancelExportMaterial(divisionName, cityName, material, amt) {\n for (let i = 0; i < material.exp.length; ++i) {\n if (material.exp[i].ind !== divisionName || material.exp[i].city !== cityName || material.exp[i].amt !== amt) continue;\n material.exp.splice(i, 1);\n break;\n }\n}\nfunction LimitProductProduction(product, cityName, qty) {\n if (qty < 0 || isNaN(qty)) {\n product.prdman[cityName][0] = false;\n } else {\n product.prdman[cityName][0] = true;\n product.prdman[cityName][1] = qty;\n }\n}\nfunction SetMaterialMarketTA1(material, on) {\n material.marketTa1 = on;\n}\nfunction SetMaterialMarketTA2(material, on) {\n material.marketTa2 = on;\n}\nfunction SetProductMarketTA1(product, on) {\n product.marketTa1 = on;\n}\nfunction SetProductMarketTA2(product, on) {\n product.marketTa2 = on;\n}\n\n//# sourceURL=webpack:///./src/Corporation/Actions.ts?"); /***/ }), /* 54 */ @@ -710,7 +710,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPositions; });\n/* harmony import */ var _data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompanyPositionsMetadata */ 697);\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyPosition */ 275);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\nconst CompanyPositions = {};\n\nfunction addCompanyPosition(params) {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n CompanyPositions[params.name] = new _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__[/* CompanyPosition */ \"a\"](params);\n}\n\n_data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companyPositionMetadata */ \"a\"].forEach(e => {\n addCompanyPosition(e);\n});\n\n//# sourceURL=webpack:///./src/Company/CompanyPositions.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPositions; });\n/* harmony import */ var _data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/CompanyPositionsMetadata */ 697);\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyPosition */ 276);\n// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\n\n\nconst CompanyPositions = {};\n\nfunction addCompanyPosition(params) {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n\n CompanyPositions[params.name] = new _CompanyPosition__WEBPACK_IMPORTED_MODULE_1__[/* CompanyPosition */ \"a\"](params);\n}\n\n_data_CompanyPositionsMetadata__WEBPACK_IMPORTED_MODULE_0__[/* companyPositionMetadata */ \"a\"].forEach(e => {\n addCompanyPosition(e);\n});\n\n//# sourceURL=webpack:///./src/Company/CompanyPositions.ts?"); /***/ }), /* 64 */, @@ -754,7 +754,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SymbolToStockMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return placeOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return cancelOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return loadStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return deleteStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return initStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return initSymbolToStockMap; });\n/* unused harmony export stockMarketCycle */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return processStockPrices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return initStockMarketFnForReact; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return eventEmitterForUiReset; });\n/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order */ 527);\n/* harmony import */ var _OrderProcessing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderProcessing */ 253);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockMarketConstants */ 472);\n/* harmony import */ var _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/InitStockMetadata */ 705);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data/StockSymbols */ 68);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/EventEmitter */ 342);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! .././ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n}; // Maps full stock name -> Stock object\n\nconst SymbolToStockMap = {}; // Maps symbol -> Stock object\n\nfunction placeOrder(stock, shares, price, type, position, workerScript = null) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid stock: '${stock}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n\n return false;\n }\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n\n return false;\n }\n\n const order = new _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"](stock.symbol, shares, price, type, position);\n\n if (StockMarket[\"Orders\"] == null) {\n const orders = {};\n\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n\n if (!(stk instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stk.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n }\n\n StockMarket[\"Orders\"][stock.symbol].push(order); // Process to see if it should be executed immediately\n\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, order.type, order.pos, processOrderRefs);\n return true;\n} // Returns true if successfully cancels an order, false otherwise\n\nfunction cancelOrder(params, workerScript = null) {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n\n if (params.order && params.order instanceof _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"]) {\n const order = params.order; // An 'Order' object is passed in\n\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n\n return false;\n } else if (params.stock && params.shares && params.price && params.type && params.pos && params.stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"]) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatMoney(params.price);\n\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n\n if (params.shares === order.shares && params.price === order.price && params.type === order.type && params.pos === order.pos) {\n stockOrders.splice(i, 1);\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n\n return true;\n }\n }\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n\n return false;\n }\n\n return false;\n}\nfunction loadStockMarket(saveString) {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n } else {\n StockMarket = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__[/* Reviver */ \"c\"]);\n }\n}\nfunction deleteStockMarket() {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n}\nfunction initStockMarket() {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__[/* InitStockMetadata */ \"a\"]) {\n const name = metadata.name;\n StockMarket[name] = new _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"](metadata);\n }\n\n const orders = {};\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n}\nfunction initSymbolToStockMap() {\n for (const name in _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"]) {\n if (_data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"].hasOwnProperty(name)) {\n const stock = StockMarket[name];\n\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n\n const symbol = _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"][name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\nfunction stockMarketCycle() {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n const roll = Math.random();\n\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n} // Stock prices updated every 6 seconds\n\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction processStockPrices(numCycles = 1) {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n } // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n\n\n const timeNow = new Date().getTime();\n\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate; // Cycle\n\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n\n --StockMarket.ticksUntilCycle;\n\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n let av = v * stock.mv / 100;\n\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n\n stock.b = false;\n }\n\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2); // Shares required for price movement gradually approaches max over time\n\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\nfunction initStockMarketFnForReact() {\n initStockMarket();\n initSymbolToStockMap();\n}\nconst eventEmitterForUiReset = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarket.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return SymbolToStockMap; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"j\", function() { return placeOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return cancelOrder; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"i\", function() { return loadStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return deleteStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return initStockMarket; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"h\", function() { return initSymbolToStockMap; });\n/* unused harmony export stockMarketCycle */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"k\", function() { return processStockPrices; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return initStockMarketFnForReact; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return eventEmitterForUiReset; });\n/* harmony import */ var _Order__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Order */ 527);\n/* harmony import */ var _OrderProcessing__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./OrderProcessing */ 253);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockMarketConstants */ 473);\n/* harmony import */ var _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/InitStockMetadata */ 705);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./data/StockSymbols */ 68);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/EventEmitter */ 344);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! .././ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n}; // Maps full stock name -> Stock object\n\nconst SymbolToStockMap = {}; // Maps symbol -> Stock object\n\nfunction placeOrder(stock, shares, price, type, position, workerScript = null) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid stock: '${stock}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n\n return false;\n }\n\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"placeOrder\", `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n\n return false;\n }\n\n const order = new _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"](stock.symbol, shares, price, type, position);\n\n if (StockMarket[\"Orders\"] == null) {\n const orders = {};\n\n for (const name in StockMarket) {\n const stk = StockMarket[name];\n\n if (!(stk instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stk.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n }\n\n StockMarket[\"Orders\"][stock.symbol].push(order); // Process to see if it should be executed immediately\n\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, order.type, order.pos, processOrderRefs);\n return true;\n} // Returns true if successfully cancels an order, false otherwise\n\nfunction cancelOrder(params, workerScript = null) {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n\n if (params.order && params.order instanceof _Order__WEBPACK_IMPORTED_MODULE_0__[/* Order */ \"a\"]) {\n const order = params.order; // An 'Order' object is passed in\n\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\n\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n return true;\n }\n }\n\n return false;\n } else if (params.stock && params.shares && params.price && params.type && params.pos && params.stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"]) {\n // Order properties are passed in. Need to look for the order\n const stockOrders = StockMarket[\"Orders\"][params.stock.symbol];\n const orderTxt = params.stock.symbol + \" - \" + params.shares + \" @ \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatMoney(params.price);\n\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n\n if (params.shares === order.shares && params.price === order.price && params.type === order.type && params.pos === order.pos) {\n stockOrders.splice(i, 1);\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n\n return true;\n }\n }\n\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n\n return false;\n }\n\n return false;\n}\nfunction loadStockMarket(saveString) {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n } else {\n StockMarket = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_12__[/* Reviver */ \"c\"]);\n }\n}\nfunction deleteStockMarket() {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0\n };\n}\nfunction initStockMarket() {\n for (const stk in StockMarket) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of _data_InitStockMetadata__WEBPACK_IMPORTED_MODULE_4__[/* InitStockMetadata */ \"a\"]) {\n const name = metadata.name;\n StockMarket[name] = new _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"](metadata);\n }\n\n const orders = {};\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n StockMarket[\"Orders\"] = orders;\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n}\nfunction initSymbolToStockMap() {\n for (const name in _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"]) {\n if (_data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"].hasOwnProperty(name)) {\n const stock = StockMarket[name];\n\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n\n const symbol = _data_StockSymbols__WEBPACK_IMPORTED_MODULE_7__[/* StockSymbols */ \"a\"][name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\nfunction stockMarketCycle() {\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n const roll = Math.random();\n\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n} // Stock prices updated every 6 seconds\n\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction processStockPrices(numCycles = 1) {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n } // We can process the update every 4 seconds as long as there are enough\n // stored cycles. This lets us account for offline time\n\n\n const timeNow = new Date().getTime();\n\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate; // Cycle\n\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = _StockMarketConstants__WEBPACK_IMPORTED_MODULE_3__[/* TicksPerCycle */ \"a\"];\n }\n\n --StockMarket.ticksUntilCycle;\n\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n\n for (const name in StockMarket) {\n const stock = StockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_2__[/* Stock */ \"a\"])) {\n continue;\n }\n\n let av = v * stock.mv / 100;\n\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\n }\n\n if (stock.price >= stock.cap) {\n chc = 0.1; // \"Soft Limit\" on stock price. It could still go up but its unlikely\n\n stock.b = false;\n }\n\n if (isNaN(chc)) {\n chc = 0.5;\n }\n\n const c = Math.random();\n const processOrderRefs = {\n stockMarket: StockMarket,\n symbolToStockMap: SymbolToStockMap\n };\n\n if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].LimitSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopBuy, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Short, processOrderRefs);\n Object(_OrderProcessing__WEBPACK_IMPORTED_MODULE_1__[/* processOrders */ \"a\"])(stock, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_5__[/* OrderTypes */ \"a\"].StopSell, _data_PositionTypes__WEBPACK_IMPORTED_MODULE_6__[/* PositionTypes */ \"a\"].Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2); // Shares required for price movement gradually approaches max over time\n\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\nfunction initStockMarketFnForReact() {\n initStockMarket();\n initSymbolToStockMap();\n}\nconst eventEmitterForUiReset = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_9__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarket.tsx?"); /***/ }), /* 75 */ @@ -816,7 +816,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateHackingChance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateHackingExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculatePercentMoneyHacked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateHackingTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateGrowTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return calculateWeakenTime; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/formulas/intelligence */ 310);\n\n\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nfunction calculateHackingChance(server, player) {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking_skill;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance = skillChance * difficultyMult * player.hacking_chance_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1);\n\n if (chance > 1) {\n return 1;\n }\n\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\n\nfunction calculateHackingExpGain(server, player) {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * player.hacking_exp_mult * diffFactor;\n return expGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackExpGain;\n}\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\n\nfunction calculatePercentMoneyHacked(server, player) {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking_skill - (server.requiredHackingSkill - 1)) / player.hacking_skill;\n const percentMoneyHacked = difficultyMult * skillMult * player.hacking_money_mult / balanceFactor;\n\n if (percentMoneyHacked < 0) {\n return 0;\n }\n\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney;\n}\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\n\nfunction calculateHackingTime(server, player) {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff; // tslint:disable-next-line\n\n skillFactor /= player.hacking_skill + baseSkill;\n const hackTimeMultiplier = 5;\n const hackingTime = hackTimeMultiplier * skillFactor / (player.hacking_speed_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1));\n return hackingTime;\n}\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\n\nfunction calculateGrowTime(server, player) {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\n\nfunction calculateWeakenTime(server, player) {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n\n//# sourceURL=webpack:///./src/Hacking.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateHackingChance; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateHackingExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculatePercentMoneyHacked; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateHackingTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateGrowTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return calculateWeakenTime; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PersonObjects/formulas/intelligence */ 312);\n\n\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nfunction calculateHackingChance(server, player) {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking_skill;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance = skillChance * difficultyMult * player.hacking_chance_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1);\n\n if (chance > 1) {\n return 1;\n }\n\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\n\nfunction calculateHackingExpGain(server, player) {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * player.hacking_exp_mult * diffFactor;\n return expGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackExpGain;\n}\n/**\n * Returns the percentage of money that will be stolen from a server if\n * it is successfully hacked (returns the decimal form, not the actual percent value)\n */\n\nfunction calculatePercentMoneyHacked(server, player) {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking_skill - (server.requiredHackingSkill - 1)) / player.hacking_skill;\n const percentMoneyHacked = difficultyMult * skillMult * player.hacking_money_mult / balanceFactor;\n\n if (percentMoneyHacked < 0) {\n return 0;\n }\n\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney;\n}\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\n\nfunction calculateHackingTime(server, player) {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff; // tslint:disable-next-line\n\n skillFactor /= player.hacking_skill + baseSkill;\n const hackTimeMultiplier = 5;\n const hackingTime = hackTimeMultiplier * skillFactor / (player.hacking_speed_mult * Object(_PersonObjects_formulas_intelligence__WEBPACK_IMPORTED_MODULE_1__[/* calculateIntelligenceBonus */ \"a\"])(player.intelligence, 1));\n return hackingTime;\n}\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\n\nfunction calculateGrowTime(server, player) {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\n\nfunction calculateWeakenTime(server, player) {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n\n//# sourceURL=webpack:///./src/Hacking.ts?"); /***/ }), /* 82 */ @@ -852,7 +852,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/BaseServer */ 431);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\n\n\n\n\n\n\nclass HacknetServer extends _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__[/* BaseServer */ \"a\"] {\n // Cache level. Affects hash Capacity\n // Number of cores. Improves hash production\n // Number of hashes that can be stored by this Hacknet Server\n // Hashes produced per second\n // Similar to Node level. Improves hash production\n // How long this HacknetServer has existed, in seconds\n // Total number of hashes earned by this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__[/* createRandomIp */ \"a\"])()\n }) {\n super(params);\n\n _defineProperty(this, \"cache\", 1);\n\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"hashCapacity\", 0);\n\n _defineProperty(this, \"hashRate\", 0);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"totalHashesGenerated\", 0);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCacheUpgradeCost */ \"a\"])(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCoreUpgradeCost */ \"b\"])(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateLevelUpgradeCost */ \"d\"])(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateRamUpgradeCost */ \"e\"])(this.maxRam, levels, costMult);\n } // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n return this.hashRate * seconds;\n }\n\n upgradeCache(levels) {\n this.cache = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeLevel(levels, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n\n this.maxRam = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n return true;\n } // Whenever a script is run, we must update this server's hash rate\n\n\n runScript(script, prodMult) {\n super.runScript(script);\n\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateHashCapacity() {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult) {\n this.hashRate = Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateHashGainRate */ \"c\"])(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(`Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`, false);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"HacknetServer\", this);\n } // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_fromJSON */ \"a\"])(HacknetServer, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.HacknetServer = HacknetServer;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetServer.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServer; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/BaseServer */ 432);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/HacknetServers */ 180);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\n\n\n\n\n\n\nclass HacknetServer extends _Server_BaseServer__WEBPACK_IMPORTED_MODULE_1__[/* BaseServer */ \"a\"] {\n // Cache level. Affects hash Capacity\n // Number of cores. Improves hash production\n // Number of hashes that can be stored by this Hacknet Server\n // Hashes produced per second\n // Similar to Node level. Improves hash production\n // How long this HacknetServer has existed, in seconds\n // Total number of hashes earned by this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_4__[/* createRandomIp */ \"a\"])()\n }) {\n super(params);\n\n _defineProperty(this, \"cache\", 1);\n\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"hashCapacity\", 0);\n\n _defineProperty(this, \"hashRate\", 0);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"totalHashesGenerated\", 0);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCacheUpgradeCost */ \"a\"])(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateCoreUpgradeCost */ \"b\"])(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateLevelUpgradeCost */ \"d\"])(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels, costMult) {\n return Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateRamUpgradeCost */ \"e\"])(this.maxRam, levels, costMult);\n } // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n return this.hashRate * seconds;\n }\n\n upgradeCache(levels) {\n this.cache = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeLevel(levels, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n\n this.maxRam = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetServerConstants */ \"b\"].MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n return true;\n } // Whenever a script is run, we must update this server's hash rate\n\n\n runScript(script, prodMult) {\n super.runScript(script);\n\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateHashCapacity() {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult) {\n this.hashRate = Object(_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_3__[/* calculateHashGainRate */ \"c\"])(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(`Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`, false);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_toJSON */ \"b\"])(\"HacknetServer\", this);\n } // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Generic_fromJSON */ \"a\"])(HacknetServer, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_5__[/* Reviver */ \"c\"].constructors.HacknetServer = HacknetServer;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetServer.ts?"); /***/ }), /* 85 */ @@ -864,7 +864,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getBaseResearchTreeCopy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getProductIndustryResearchTreeCopy; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ResearchMap */ 284);\n/* harmony import */ var _ResearchTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ResearchTree */ 470);\n// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\n\n\n\nfunction makeNode(name) {\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][name];\n\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]({\n text: research.name,\n cost: research.cost\n });\n} // Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\n\n\nfunction createBaseResearchTreeNodes() {\n const rootNode = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew = makeNode(\"AutoBrew\");\n const autoParty = makeNode(\"AutoPartyManager\");\n const autoDrugs = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing = makeNode(\"Bulk Purchasing\");\n const cph4 = makeNode(\"CPH4 Injections\");\n const drones = makeNode(\"Drones\");\n const dronesAssembly = makeNode(\"Drones - Assembly\");\n const dronesTransport = makeNode(\"Drones - Transport\");\n const goJuice = makeNode(\"Go-Juice\");\n const hrRecruitment = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining = makeNode(\"HRBuddy-Training\");\n const joywire = makeNode(\"JoyWire\");\n const marketta1 = makeNode(\"Market-TA.I\");\n const marketta2 = makeNode(\"Market-TA.II\");\n const overclock = makeNode(\"Overclock\");\n const scAssemblers = makeNode(\"Self-Correcting Assemblers\");\n const stimu = makeNode(\"Sti.mu\");\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n hrRecruitment.addChild(hrTraining);\n marketta1.addChild(marketta2);\n overclock.addChild(stimu);\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n return rootNode;\n}\n\nfunction getBaseResearchTreeCopy() {\n const baseResearchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n return baseResearchTree;\n} // Base Research Tree for Industry's that make products\n\nfunction getProductIndustryResearchTreeCopy() {\n const researchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n const root = createBaseResearchTreeNodes();\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n researchTree.setRoot(root);\n return researchTree;\n}\n\n//# sourceURL=webpack:///./src/Corporation/data/BaseResearchTree.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getBaseResearchTreeCopy; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getProductIndustryResearchTreeCopy; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../ResearchMap */ 285);\n/* harmony import */ var _ResearchTree__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ResearchTree */ 471);\n// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\n\n\n\nfunction makeNode(name) {\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][name];\n\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]({\n text: research.name,\n cost: research.cost\n });\n} // Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\n\n\nfunction createBaseResearchTreeNodes() {\n const rootNode = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew = makeNode(\"AutoBrew\");\n const autoParty = makeNode(\"AutoPartyManager\");\n const autoDrugs = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing = makeNode(\"Bulk Purchasing\");\n const cph4 = makeNode(\"CPH4 Injections\");\n const drones = makeNode(\"Drones\");\n const dronesAssembly = makeNode(\"Drones - Assembly\");\n const dronesTransport = makeNode(\"Drones - Transport\");\n const goJuice = makeNode(\"Go-Juice\");\n const hrRecruitment = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining = makeNode(\"HRBuddy-Training\");\n const joywire = makeNode(\"JoyWire\");\n const marketta1 = makeNode(\"Market-TA.I\");\n const marketta2 = makeNode(\"Market-TA.II\");\n const overclock = makeNode(\"Overclock\");\n const scAssemblers = makeNode(\"Self-Correcting Assemblers\");\n const stimu = makeNode(\"Sti.mu\");\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n hrRecruitment.addChild(hrTraining);\n marketta1.addChild(marketta2);\n overclock.addChild(stimu);\n rootNode.addChild(autoBrew);\n rootNode.addChild(autoParty);\n rootNode.addChild(autoDrugs);\n rootNode.addChild(bulkPurchasing);\n rootNode.addChild(drones);\n rootNode.addChild(hrRecruitment);\n rootNode.addChild(joywire);\n rootNode.addChild(marketta1);\n rootNode.addChild(overclock);\n rootNode.addChild(scAssemblers);\n return rootNode;\n}\n\nfunction getBaseResearchTreeCopy() {\n const baseResearchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n return baseResearchTree;\n} // Base Research Tree for Industry's that make products\n\nfunction getProductIndustryResearchTreeCopy() {\n const researchTree = new _ResearchTree__WEBPACK_IMPORTED_MODULE_1__[/* ResearchTree */ \"b\"]();\n const root = createBaseResearchTreeNodes();\n const upgradeFulcrum = makeNode(\"uPgrade: Fulcrum\");\n const upgradeCapacity1 = makeNode(\"uPgrade: Capacity.I\");\n const upgradeCapacity2 = makeNode(\"uPgrade: Capacity.II\");\n const upgradeDashboard = makeNode(\"uPgrade: Dashboard\");\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n researchTree.setRoot(root);\n return researchTree;\n}\n\n//# sourceURL=webpack:///./src/Corporation/data/BaseResearchTree.ts?"); /***/ }), /* 86 */ @@ -914,7 +914,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inviteToFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return joinFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return startHackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return hasAugmentationPrereqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return purchaseAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextNeurofluxLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return processPassiveFactionRepGain; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/PlayerOwnedAugmentation */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Factions */ 22);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/InvitationPopup */ 657);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction inviteToFaction(faction) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.push(faction.name);\n faction.alreadyInvited = true;\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressFactionInvites) {\n const popupId = \"faction-invitation\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__[/* InvitationPopup */ \"a\"], {\n player: _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"],\n faction: faction,\n popupId: popupId\n });\n }\n}\nfunction joinFaction(faction) {\n if (faction.isMember) return;\n faction.isMember = true;\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factions.push(faction.name);\n const factionInfo = faction.getInfo(); //Determine what factions you are banned from now that you have joined this faction\n\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n\n if (_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy] instanceof _Faction__WEBPACK_IMPORTED_MODULE_5__[/* Faction */ \"a\"]) {\n _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy].isBanned = true;\n }\n }\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i] == faction.name || _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\nfunction startHackingMission(faction) {\n const mission = new _Missions__WEBPACK_IMPORTED_MODULE_7__[/* HackingMission */ \"a\"](faction.playerReputation, faction);\n Object(_Missions__WEBPACK_IMPORTED_MODULE_7__[/* setInMission */ \"d\"])(true, mission); //Sets inMission flag to true\n\n mission.init();\n} //Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\n\nfunction hasAugmentationPrereqs(aug) {\n let hasPrereqs = true;\n\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][aug.prereqs[i]];\n\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n\n if (prereqAug.owned === false) {\n hasPrereqs = false; // Check if the aug is purchased\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\nfunction purchaseAugmentation(aug, fac, sing = false) {\n const factionInfo = fac.getInfo();\n var hasPrereqs = hasAugmentationPrereqs(aug);\n\n if (!hasPrereqs) {\n var txt = \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n\n if (sing) {\n return txt;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n }\n } else if (aug.baseCost !== 0 && _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) {\n let txt = \"You don't have enough money to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n let txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (aug.baseCost === 0 || _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased === false) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased = true;\n document.getElementById(\"augmentations-tab\").style.display = \"list-item\";\n document.getElementById(\"character-menu-header\").click();\n document.getElementById(\"character-menu-header\").click();\n }\n\n var queuedAugmentation = new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.push(queuedAugmentation);\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].loseMoney(aug.baseCost * factionInfo.augmentationPriceMult); // If you just purchased Neuroflux Governor, recalculate the cost\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n var nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n var mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n aug.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name].baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"You purchased \" + aug.name + \". It's enhancements will not take \" + \"effect until they are installed. To install your augmentations, go to the \" + \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" + \"augmentations will now be more expensive.\");\n }\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"Hmm, something went wrong when trying to purchase an Augmentation. \" + \"Please report this to the game developer with an explanation of how to \" + \"reproduce this.\");\n }\n}\nfunction getNextNeurofluxLevel() {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].level;\n }\n } // Account for purchased but uninstalled Augmentations\n\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[i].name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n\n return currLevel + 1;\n}\nfunction processPassiveFactionRepGain(numCycles) {\n for (const name in _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (name === _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].currentWorkFactionName) continue;\n if (!_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) continue;\n const faction = _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name];\n if (!faction.isMember) continue; // No passive rep for special factions\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No passive rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].getGangName() === name) continue; // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01); // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n faction.playerReputation += rate * numCycles * _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain;\n }\n}\n\n//# sourceURL=webpack:///./src/Faction/FactionHelpers.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inviteToFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return joinFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"g\", function() { return startHackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return hasAugmentationPrereqs; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return purchaseAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextNeurofluxLevel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return processPassiveFactionRepGain; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Faction */ 135);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Factions */ 22);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./ui/InvitationPopup */ 657);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction inviteToFaction(faction) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.push(faction.name);\n faction.alreadyInvited = true;\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressFactionInvites) {\n const popupId = \"faction-invitation\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _ui_InvitationPopup__WEBPACK_IMPORTED_MODULE_14__[/* InvitationPopup */ \"a\"], {\n player: _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"],\n faction: faction,\n popupId: popupId\n });\n }\n}\nfunction joinFaction(faction) {\n if (faction.isMember) return;\n faction.isMember = true;\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factions.push(faction.name);\n const factionInfo = faction.getInfo(); //Determine what factions you are banned from now that you have joined this faction\n\n for (const i in factionInfo.enemies) {\n const enemy = factionInfo.enemies[i];\n\n if (_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy] instanceof _Faction__WEBPACK_IMPORTED_MODULE_5__[/* Faction */ \"a\"]) {\n _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][enemy].isBanned = true;\n }\n }\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i] == faction.name || _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\nfunction startHackingMission(faction) {\n const mission = new _Missions__WEBPACK_IMPORTED_MODULE_7__[/* HackingMission */ \"a\"](faction.playerReputation, faction);\n Object(_Missions__WEBPACK_IMPORTED_MODULE_7__[/* setInMission */ \"d\"])(true, mission); //Sets inMission flag to true\n\n mission.init();\n} //Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\n\nfunction hasAugmentationPrereqs(aug) {\n let hasPrereqs = true;\n\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][aug.prereqs[i]];\n\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n\n if (prereqAug.owned === false) {\n hasPrereqs = false; // Check if the aug is purchased\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\nfunction purchaseAugmentation(aug, fac, sing = false) {\n const factionInfo = fac.getInfo();\n var hasPrereqs = hasAugmentationPrereqs(aug);\n\n if (!hasPrereqs) {\n var txt = \"You must first purchase or install \" + aug.prereqs.join(\",\") + \" before you can \" + \"purchase this one.\";\n\n if (sing) {\n return txt;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n }\n } else if (aug.baseCost !== 0 && _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.lt(aug.baseCost * factionInfo.augmentationPriceMult)) {\n let txt = \"You don't have enough money to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n let txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n\n if (sing) {\n return txt;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(txt);\n } else if (aug.baseCost === 0 || _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].money.gte(aug.baseCost * factionInfo.augmentationPriceMult)) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased === false) {\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].firstAugPurchased = true;\n document.getElementById(\"augmentations-tab\").style.display = \"list-item\";\n document.getElementById(\"character-menu-header\").click();\n document.getElementById(\"character-menu-header\").click();\n }\n\n var queuedAugmentation = new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.push(queuedAugmentation);\n _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].loseMoney(aug.baseCost * factionInfo.augmentationPriceMult); // If you just purchased Neuroflux Governor, recalculate the cost\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n var nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n var mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n aug.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name].baseCost *= _Constants__WEBPACK_IMPORTED_MODULE_4__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_11__[/* SourceFileFlags */ \"a\"][11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_9__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"You purchased \" + aug.name + \". It's enhancements will not take \" + \"effect until they are installed. To install your augmentations, go to the \" + \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" + \"augmentations will now be more expensive.\");\n }\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_12__[/* dialogBoxCreate */ \"a\"])(\"Hmm, something went wrong when trying to purchase an Augmentation. \" + \"Please report this to the game developer with an explanation of how to \" + \"reproduce this.\");\n }\n}\nfunction getNextNeurofluxLevel() {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].augmentations[i].level;\n }\n } // Account for purchased but uninstalled Augmentations\n\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].queuedAugmentations[i].name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n\n return currLevel + 1;\n}\nfunction processPassiveFactionRepGain(numCycles) {\n for (const name in _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (name === _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].currentWorkFactionName) continue;\n if (!_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) continue;\n const faction = _Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name];\n if (!faction.isMember) continue; // No passive rep for special factions\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No passive rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].getGangName() === name) continue; // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01); // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_10__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"], faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n faction.playerReputation += rate * numCycles * _Player__WEBPACK_IMPORTED_MODULE_8__[/* Player */ \"a\"].faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].FactionPassiveRepGain;\n }\n}\n\n//# sourceURL=webpack:///./src/Faction/FactionHelpers.jsx?"); /***/ }), /* 92 */ @@ -926,7 +926,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Server; });\n/* harmony import */ var _BaseServer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseServer */ 431);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/createRandomString */ 654);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Class representing a single hackable Server\n\n\n\n\n\nclass Server extends _BaseServer__WEBPACK_IMPORTED_MODULE_0__[/* BaseServer */ \"a\"] {\n // Flag indicating whether this server has a backdoor installed by a player\n // Initial server security level\n // (i.e. security level when the server was created)\n // Server Security Level\n // Minimum server security level that this server can be weakened to\n // How much money currently resides on the server and can be hacked\n // Maximum amount of money that this server can hold\n // Number of open ports required in order to gain admin/root access\n // How many ports are currently opened on the server\n // Flag indicating wehther this is a purchased server\n // Hacking level required to hack this server\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])()\n }) {\n super(params); // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n\n _defineProperty(this, \"backdoorInstalled\", false);\n\n _defineProperty(this, \"baseDifficulty\", 1);\n\n _defineProperty(this, \"hackDifficulty\", 1);\n\n _defineProperty(this, \"minDifficulty\", 1);\n\n _defineProperty(this, \"moneyAvailable\", 0);\n\n _defineProperty(this, \"moneyMax\", 0);\n\n _defineProperty(this, \"numOpenPortsRequired\", 5);\n\n _defineProperty(this, \"openPortCount\", 0);\n\n _defineProperty(this, \"purchasedByPlayer\", false);\n\n _defineProperty(this, \"requiredHackingSkill\", 1);\n\n _defineProperty(this, \"serverGrowth\", 1);\n\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = Object(_utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__[/* createRandomString */ \"a\"])(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false; //RAM, CPU speed and Scripts\n\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable = params.moneyAvailable != null ? params.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney; //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n\n this.hackDifficulty = params.hackDifficulty != null ? params.hackDifficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n //Port information, required for porthacking servers to get admin rights\n\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n\n\n capDifficulty() {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n } // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n\n\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMinimumSecurity(n, perc = false) {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n } // Server security cannot go below 1\n\n\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMaximumMoney(n, perc = false) {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\n }\n }\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n\n\n fortify(amt) {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n\n\n weaken(amt) {\n this.hackDifficulty -= amt * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate;\n this.capDifficulty();\n }\n /**\n * Serialize the current object to a JSON save state\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Server\", this);\n } // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Server, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Server = Server;\n\n//# sourceURL=webpack:///./src/Server/Server.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Server; });\n/* harmony import */ var _BaseServer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BaseServer */ 432);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/helpers/createRandomString */ 654);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Class representing a single hackable Server\n\n\n\n\n\nclass Server extends _BaseServer__WEBPACK_IMPORTED_MODULE_0__[/* BaseServer */ \"a\"] {\n // Flag indicating whether this server has a backdoor installed by a player\n // Initial server security level\n // (i.e. security level when the server was created)\n // Server Security Level\n // Minimum server security level that this server can be weakened to\n // How much money currently resides on the server and can be hacked\n // Maximum amount of money that this server can hold\n // Number of open ports required in order to gain admin/root access\n // How many ports are currently opened on the server\n // Flag indicating wehther this is a purchased server\n // Hacking level required to hack this server\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_3__[/* createRandomIp */ \"a\"])()\n }) {\n super(params); // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n\n _defineProperty(this, \"backdoorInstalled\", false);\n\n _defineProperty(this, \"baseDifficulty\", 1);\n\n _defineProperty(this, \"hackDifficulty\", 1);\n\n _defineProperty(this, \"minDifficulty\", 1);\n\n _defineProperty(this, \"moneyAvailable\", 0);\n\n _defineProperty(this, \"moneyMax\", 0);\n\n _defineProperty(this, \"numOpenPortsRequired\", 5);\n\n _defineProperty(this, \"openPortCount\", 0);\n\n _defineProperty(this, \"purchasedByPlayer\", false);\n\n _defineProperty(this, \"requiredHackingSkill\", 1);\n\n _defineProperty(this, \"serverGrowth\", 1);\n\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = Object(_utils_helpers_createRandomString__WEBPACK_IMPORTED_MODULE_2__[/* createRandomString */ \"a\"])(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false; //RAM, CPU speed and Scripts\n\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable = params.moneyAvailable != null ? params.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerMaxMoney; //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n\n this.hackDifficulty = params.hackDifficulty != null ? params.hackDifficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerStartingSecurity : 1;\n this.baseDifficulty = this.hackDifficulty;\n this.minDifficulty = Math.max(1, Math.round(this.hackDifficulty / 3));\n this.serverGrowth = params.serverGrowth != null ? params.serverGrowth : 1; //Integer from 0 to 100. Affects money increase from grow()\n //Port information, required for porthacking servers to get admin rights\n\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n\n\n capDifficulty() {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n } // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n\n\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\n }\n /**\n * Change this server's minimum security\n * @param n - Value by which to increase/decrease the server's minimum security\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMinimumSecurity(n, perc = false) {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n } // Server security cannot go below 1\n\n\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n * @param perc - Whether it should be changed by a percentage, or a flat value\n */\n\n\n changeMaximumMoney(n, perc = false) {\n if (perc) {\n this.moneyMax *= n;\n } else {\n this.moneyMax += n;\n }\n }\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n\n\n fortify(amt) {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n\n\n weaken(amt) {\n this.hackDifficulty -= amt * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerWeakenRate;\n this.capDifficulty();\n }\n /**\n * Serialize the current object to a JSON save state\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Server\", this);\n } // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Server, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Server = Server;\n\n//# sourceURL=webpack:///./src/Server/Server.ts?"); /***/ }), /* 93 */ @@ -966,7 +966,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperation; });\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Operation */ 262);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass BlackOperation extends _Operation__WEBPACK_IMPORTED_MODULE_0__[/* Operation */ \"a\"] {\n constructor(params = null) {\n super(params);\n this.count = 1;\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1.5;\n }\n\n getChaosCompetencePenalty() {\n return 1;\n }\n\n getChaosDifficultyBonus() {\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"BlackOperation\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(BlackOperation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.BlackOperation = BlackOperation;\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperation.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperation; });\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Operation */ 263);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass BlackOperation extends _Operation__WEBPACK_IMPORTED_MODULE_0__[/* Operation */ \"a\"] {\n constructor(params = null) {\n super(params);\n this.count = 1;\n } // To be implemented by subtypes\n\n\n getActionTimePenalty() {\n return 1.5;\n }\n\n getChaosCompetencePenalty() {\n return 1;\n }\n\n getChaosDifficultyBonus() {\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"BlackOperation\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(BlackOperation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.BlackOperation = BlackOperation;\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperation.ts?"); /***/ }), /* 100 */ @@ -982,7 +982,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ }), /* 101 */, -/* 102 */ +/* 102 */, +/* 103 */ /*!*******************************************!*\ !*** ./src/Netscript/killWorkerScript.ts ***! \*******************************************/ @@ -991,10 +992,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killWorkerScript; });\n/* harmony import */ var _WorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScript */ 249);\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n/* harmony import */ var _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Script/RunningScript */ 276);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 309);\n/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\n\n\n\n\n\n\n\nfunction killWorkerScript(script, serverIp, rerenderUi) {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(script);\n return true;\n } else if (script instanceof _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__[/* RunningScript */ \"a\"] && typeof serverIp === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n\n if (res) {\n return res;\n } // If for some reason that doesn't work, we'll try the old way\n\n\n for (const ws of _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].values()) {\n if (ws.name == script.filename && ws.serverIp == serverIp && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid, rerenderUi = true) {\n const ws = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].get(pid);\n\n if (ws instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript, rerenderUi = true) {\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript | number} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\n\n\nfunction removeWorkerScript(workerScript, rerenderUi = true) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n const ip = workerScript.serverIp;\n const name = workerScript.name; // Get the server on which the script runs\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ \"b\"][ip];\n\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n } // Recalculate ram used on that server\n\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__[/* roundToTwo */ \"a\"])(server.ramUsed - workerScript.ramUsage);\n\n if (server.ramUsed < 0) {\n console.warn(`Server (${server.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${server.ramUsed}`);\n server.ramUsed = 0;\n } // Delete the RunningScript object from that server\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n\n if (runningScript.filename === name && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n } // Delete script from global pool (workerScripts)\n\n\n const res = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].delete(workerScript.pid);\n\n if (!res) {\n console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n console.warn(workerScript);\n }\n\n if (rerenderUi) {\n _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\n }\n}\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\n\n\nfunction killNetscriptDelay(workerScript) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Netscript/killWorkerScript.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killWorkerScript; });\n/* harmony import */ var _WorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScript */ 249);\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n/* harmony import */ var _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Script/RunningScript */ 277);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 311);\n/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\n\n\n\n\n\n\n\nfunction killWorkerScript(script, serverIp, rerenderUi) {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(script);\n return true;\n } else if (script instanceof _Script_RunningScript__WEBPACK_IMPORTED_MODULE_3__[/* RunningScript */ \"a\"] && typeof serverIp === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n\n if (res) {\n return res;\n } // If for some reason that doesn't work, we'll try the old way\n\n\n for (const ws of _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].values()) {\n if (ws.name == script.filename && ws.serverIp == serverIp && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n }\n\n return false;\n } else if (typeof script === \"number\") {\n return killWorkerScriptByPid(script, rerenderUi);\n } else {\n console.error(`killWorkerScript() called with invalid argument:`);\n console.error(script);\n return false;\n }\n}\n\nfunction killWorkerScriptByPid(pid, rerenderUi = true) {\n const ws = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].get(pid);\n\n if (ws instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript, rerenderUi = true) {\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\n/**\n * Helper function that removes the script being killed from the global pool.\n * Also handles other cleanup-time operations\n *\n * @param {WorkerScript | number} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\n\n\nfunction removeWorkerScript(workerScript, rerenderUi = true) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n const ip = workerScript.serverIp;\n const name = workerScript.name; // Get the server on which the script runs\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_4__[/* AllServers */ \"b\"][ip];\n\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n } // Recalculate ram used on that server\n\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_6__[/* roundToTwo */ \"a\"])(server.ramUsed - workerScript.ramUsage);\n\n if (server.ramUsed < 0) {\n console.warn(`Server (${server.hostname}) RAM usage went negative (if it's due to floating pt imprecision, it's okay): ${server.ramUsed}`);\n server.ramUsed = 0;\n } // Delete the RunningScript object from that server\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n\n if (runningScript.filename === name && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_5__[/* compareArrays */ \"a\"])(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n } // Delete script from global pool (workerScripts)\n\n\n const res = _WorkerScripts__WEBPACK_IMPORTED_MODULE_1__[/* workerScripts */ \"a\"].delete(workerScript.pid);\n\n if (!res) {\n console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n console.warn(workerScript);\n }\n\n if (rerenderUi) {\n _WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_2__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n }\n } else {\n console.error(`Invalid argument passed into removeWorkerScript():`);\n console.error(workerScript);\n return;\n }\n}\n/**\n * Helper function that interrupts a script's delay if it is in the middle of a\n * timed, blocked operation (like hack(), sleep(), etc.). This allows scripts to\n * be killed immediately even if they're in the middle of one of those long operations\n */\n\n\nfunction killNetscriptDelay(workerScript) {\n if (workerScript instanceof _WorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* WorkerScript */ \"a\"]) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n\n if (workerScript.delayResolve) {\n workerScript.delayResolve();\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Netscript/killWorkerScript.ts?"); /***/ }), -/* 103 */ +/* 104 */ /*!**********************************!*\ !*** ./src/StockMarket/Stock.ts ***! \**********************************/ @@ -1006,7 +1007,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* unused harmony export StockForecastInfluenceLimit */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stock; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n\n\nconst StockForecastInfluenceLimit = 5;\nconst defaultConstructorParams = {\n b: true,\n initPrice: 10e3,\n marketCap: 1e12,\n mv: 1,\n name: \"\",\n otlkMag: 0,\n spreadPerc: 0,\n shareTxForMovement: 1e6,\n symbol: \"\"\n}; // Helper function that convert a IMinMaxRange to a number\n\nfunction toNumber(n) {\n let value;\n\n switch (typeof n) {\n case \"number\":\n {\n return n;\n }\n\n case \"object\":\n {\n const range = n;\n value = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(range.min, range.max);\n break;\n }\n\n default:\n throw Error(`Do not know how to convert the type '${typeof n}' to a number`);\n }\n\n if (typeof n === \"object\" && typeof n.divisor === \"number\") {\n return value / n.divisor;\n }\n\n return value;\n}\n/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\n\n\nclass Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n\n /**\n * Maximum price of a stock (per share)\n */\n\n /**\n * Stocks previous share price\n */\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n\n /**\n * Maximum volatility\n */\n\n /**\n * Name of the company that the stock is for\n */\n\n /**\n * Outlook magnitude. Represents the stock's forecast and likelihood\n * of increasing/decreasing (based on whether its in bear or bull mode)\n */\n\n /**\n * Forecast of outlook magnitude. Essentially a second-order forecast.\n * Unlike 'otlkMag', this number is on an absolute scale from 0-100 (rather than 0-50)\n */\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n\n /**\n * Number of shares the player owns in the LONG position\n */\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n\n /**\n * Stock's share price\n */\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n\n /**\n * Spread percentage. The bid/ask prices for this stock are N% above or below\n * the \"real price\" to emulate spread.\n */\n\n /**\n * The stock's ticker symbol\n */\n\n /**\n * Total number of shares of this stock\n * This is different than maxShares, as this is like authorized stock while\n * maxShares is outstanding stock.\n */\n constructor(p = defaultConstructorParams) {\n this.name = p.name;\n this.symbol = p.symbol;\n this.price = toNumber(p.initPrice);\n this.lastPrice = this.price;\n this.playerShares = 0;\n this.playerAvgPx = 0;\n this.playerShortShares = 0;\n this.playerAvgShortPx = 0;\n this.mv = toNumber(p.mv);\n this.b = p.b;\n this.otlkMag = p.otlkMag;\n this.otlkMagForecast = this.getAbsoluteForecast();\n this.cap = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement; // Total shares is determined by market cap, and is rounded to nearest 100k\n\n const totalSharesUnrounded = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5; // Max Shares (Outstanding shares) is a percentage of total shares\n\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round(this.totalShares * outstandingSharePercentage / 1e5) * 1e5;\n }\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n\n\n changeForecastForecast(newff) {\n this.otlkMagForecast = newff;\n\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n\n\n changePrice(newPrice) {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\n /**\n * Change the stock's forecast during a stock market 'tick'.\n * The way a stock's forecast changes depends on various internal properties,\n * but is ultimately determined by RNG\n */\n\n\n cycleForecast(changeAmt = 0.1) {\n const increaseChance = this.getForecastIncreaseChance();\n\n if (Math.random() < increaseChance) {\n // Forecast increases\n if (this.b) {\n this.otlkMag += changeAmt;\n } else {\n this.otlkMag -= changeAmt;\n }\n } else {\n // Forecast decreases\n if (this.b) {\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\n }\n /**\n * Change's the stock's second-order forecast during a stock market 'tick'.\n * The change for the second-order forecast to increase is 50/50\n */\n\n\n cycleForecastForecast(changeAmt = 0.1) {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\n }\n /**\n * \"Flip\" the stock's second-order forecast. This can occur during a\n * stock market \"cycle\" (determined by RNG). It is used to simulate\n * RL stock market cycles and introduce volatility\n */\n\n\n flipForecastForecast() {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n\n\n getAbsoluteForecast() {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n\n\n getAskPrice() {\n return this.price * (1 + this.spreadPerc / 100);\n }\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n\n\n getBidPrice() {\n return this.price * (1 - this.spreadPerc / 100);\n }\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n\n\n getForecastIncreaseChance() {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\n /**\n * Changes a stock's forecast. This is used when the stock is influenced\n * by a transaction. The stock's forecast always goes towards 50, but the\n * movement is capped by a certain threshold/limit\n */\n\n\n influenceForecast(change) {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\n }\n /**\n * Changes a stock's second-order forecast. This is used when the stock is\n * influenced by a transaction. The stock's second-order forecast always\n * goes towards 50.\n */\n\n\n influenceForecastForecast(change) {\n if (this.otlkMagForecast > 50) {\n this.otlkMagForecast -= change;\n this.otlkMagForecast = Math.max(50, this.otlkMagForecast);\n } else if (this.otlkMagForecast < 50) {\n this.otlkMagForecast += change;\n this.otlkMagForecast = Math.min(50, this.otlkMagForecast);\n }\n }\n /**\n * Serialize the Stock to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Stock\", this);\n }\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Stock, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Stock = Stock;\n\n//# sourceURL=webpack:///./src/StockMarket/Stock.ts?"); /***/ }), -/* 104 */ +/* 105 */ /*!*********************************!*\ !*** ./src/Locations/Cities.ts ***! \*********************************/ @@ -1018,7 +1019,6 @@ eval("/* unused harmony export StockForecastInfluenceLimit */\n/* harmony export eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cities; });\n/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nconst Cities = {};\n\n//# sourceURL=webpack:///./src/Locations/Cities.ts?"); /***/ }), -/* 105 */, /* 106 */, /* 107 */ /*!*************************************!*\ @@ -1029,7 +1029,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Adjuster; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/icons-material/Add */ 831);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/icons-material/Remove */ 832);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/Clear */ 455);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 447);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Tooltip */ 105);\n\n\n\n\n\n\n\n\nfunction Adjuster(props) {\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n if (event.target.value === \"\") setValue(\"\");else setValue(parseFloat(event.target.value));\n }\n\n const {\n label,\n placeholder,\n add,\n subtract,\n reset,\n tons\n } = props;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n label: label,\n value: value,\n onChange: onChange,\n placeholder: placeholder,\n type: \"number\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add a lot\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: tons,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n }\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => add(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default.a, null)))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Remove\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => subtract(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default.a, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Reset\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: reset,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default.a, null))))\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Adjuster.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Adjuster; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/icons-material/Add */ 831);\n/* harmony import */ var _mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/icons-material/Remove */ 832);\n/* harmony import */ var _mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/Clear */ 456);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 448);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Tooltip */ 102);\n\n\n\n\n\n\n\n\nfunction Adjuster(props) {\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n if (event.target.value === \"\") setValue(\"\");else setValue(parseFloat(event.target.value));\n }\n\n const {\n label,\n placeholder,\n add,\n subtract,\n reset,\n tons\n } = props;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n label: label,\n value: value,\n onChange: onChange,\n placeholder: placeholder,\n type: \"number\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add a lot\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: tons,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_5___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n }\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Add\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => add(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Add__WEBPACK_IMPORTED_MODULE_1___default.a, null)))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Remove\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: () => subtract(typeof value !== \"string\" ? value : 0),\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Remove__WEBPACK_IMPORTED_MODULE_2___default.a, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n title: \"Reset\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: reset,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_4___default.a, null))))\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Adjuster.tsx?"); /***/ }), /* 108 */, @@ -1042,7 +1042,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return netscriptDelay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return makeRuntimeRejectMsg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return resolveNetscriptRequestedThreads; });\n/* unused harmony export getErrorLineNumber */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isScriptErrorMessage; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n\n\n\nfunction netscriptDelay(time, workerScript) {\n return new Promise(function (resolve) {\n workerScript.delay = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n workerScript.delay = null;\n resolve();\n }, time);\n workerScript.delayResolve = resolve;\n });\n}\nfunction makeRuntimeRejectMsg(workerScript, msg, exp = null) {\n var lineNum = \"\";\n\n if (exp != null) {\n var num = getErrorLineNumber(exp, workerScript);\n lineNum = \" (Line \" + num + \")\";\n }\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][workerScript.serverIp];\n\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);\n }\n\n return \"|\" + server.hostname + \"|\" + workerScript.name + \"|\" + msg + lineNum;\n}\nfunction resolveNetscriptRequestedThreads(workerScript, functionName, requestedThreads) {\n const threads = workerScript.scriptRef.threads;\n\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n\n const requestedThreadsAsInt = requestedThreads | 0;\n\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(workerScript, `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`);\n }\n\n if (requestedThreads > threads) {\n throw makeRuntimeRejectMsg(workerScript, `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`);\n }\n\n return requestedThreadsAsInt;\n}\nfunction getErrorLineNumber(exp, workerScript) {\n var code = workerScript.scriptRef.codeCode(); //Split code up to the start of the node\n\n try {\n code = code.substring(0, exp.start);\n return (code.match(/\\n/g) || []).length + 1;\n } catch (e) {\n return -1;\n }\n}\nfunction isScriptErrorMessage(msg) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__[/* isString */ \"a\"])(msg)) {\n return false;\n }\n\n let splitMsg = msg.split(\"|\");\n\n if (splitMsg.length != 4) {\n return false;\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/NetscriptEvaluator.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return netscriptDelay; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return makeRuntimeRejectMsg; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return resolveNetscriptRequestedThreads; });\n/* unused harmony export getErrorLineNumber */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isScriptErrorMessage; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n\n\n\nfunction netscriptDelay(time, workerScript) {\n return new Promise(function (resolve) {\n workerScript.delay = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n workerScript.delay = null;\n resolve();\n }, time);\n workerScript.delayResolve = resolve;\n });\n}\nfunction makeRuntimeRejectMsg(workerScript, msg, exp = null) {\n var lineNum = \"\";\n\n if (exp != null) {\n var num = getErrorLineNumber(exp, workerScript);\n lineNum = \" (Line \" + num + \")\";\n }\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_2__[/* AllServers */ \"b\"][workerScript.serverIp];\n\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.serverIp}`);\n }\n\n return \"|\" + server.hostname + \"|\" + workerScript.name + \"|\" + msg + lineNum;\n}\nfunction resolveNetscriptRequestedThreads(workerScript, functionName, requestedThreads) {\n const threads = workerScript.scriptRef.threads;\n\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n\n const requestedThreadsAsInt = requestedThreads | 0;\n\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(workerScript, `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`);\n }\n\n if (requestedThreads > threads) {\n throw makeRuntimeRejectMsg(workerScript, `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`);\n }\n\n return requestedThreadsAsInt;\n}\nfunction getErrorLineNumber(exp, workerScript) {\n var code = workerScript.scriptRef.codeCode(); //Split code up to the start of the node\n\n try {\n code = code.substring(0, exp.start);\n return (code.match(/\\n/g) || []).length + 1;\n } catch (e) {\n return -1;\n }\n}\nfunction isScriptErrorMessage(msg) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_1__[/* isString */ \"a\"])(msg)) {\n return false;\n }\n\n let splitMsg = msg.split(\"|\");\n\n if (splitMsg.length != 4) {\n return false;\n }\n\n return true;\n}\n\n//# sourceURL=webpack:///./src/NetscriptEvaluator.js?"); /***/ }), /* 110 */ @@ -1074,7 +1074,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 114 */, /* 115 */, /* 116 */, -/* 117 */ +/* 117 */, +/* 118 */ /*!**************************************************!*\ !*** ./src/Augmentation/AugmentationHelpers.jsx ***! \**************************************************/ @@ -1083,10 +1084,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isRepeatableAug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return installAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return augmentationExists; });\n/* harmony import */ var _Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation */ 28);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20);\n/* harmony import */ var _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerOwnedAugmentation */ 273);\n/* harmony import */ var _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Prestige */ 274);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/clearObject */ 716);\n/* harmony import */ var _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Casino/RNG */ 278);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction AddToAugmentations(aug) {\n var name = aug.name;\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name] = aug;\n}\n\nfunction getRandomBonus() {\n var bonuses = [{\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1\n },\n description: \"Increases the player's hacking chance by 25%.
\" + \"Increases the player's hacking speed by 10%.
\" + \"Increases the amount of money the player's gains from hacking by 25%.
\" + \"Improves grow() by 10%.\"\n }, {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2\n },\n description: \"Increases the player's hacking skill by 15%.
\" + \"Increases the player's hacking experience gain rate by 100%.\"\n }, {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2\n },\n description: \"Increases all of the player's combat stats by 25%.
\" + \"Increases all of the player's combat stat experience gain rate by 100%.\"\n }, {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2\n },\n description: \"This augmentation increases the player's charisma by 50%.
\" + \"Increases the player's charisma experience gain rate by 100%.\"\n }, {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85\n },\n description: \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" + \"Decreases all costs related to Hacknet Node by 15%.\"\n }, {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7\n },\n description: \"Increases the amount of money the player gains from working by 70%.
\" + \"Increases the amount of reputation the player gains when working for a company by 25%.
\" + \"Increases the amount of reputation the player gains for a faction by 15%.\"\n }, {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2\n },\n description: \"Increases the player's crime success rate by 100%.
\" + \"Increases the amount of money the player gains from crimes by 100%.\"\n }];\n const randomNumber = new _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__[/* WHRNG */ \"b\"](Math.floor(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].lastUpdate / 3600000));\n\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations() {\n for (var name in _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name].augmentations = [];\n }\n } //Reset Augmentations\n\n\n Object(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__[/* clearObject */ \"a\"])(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]); //Time-Based Augment Test\n\n const randomBonuses = getRandomBonus();\n const UnstableCircadianModulatorParams = {\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info: \"An experimental nanobot injection. Its unstable nature leads to \" + \"unpredictable results based on your circadian rhythm.\"\n };\n Object.keys(randomBonuses.bonuses).forEach(key => UnstableCircadianModulatorParams[key] = randomBonuses.bonuses[key]);\n const UnstableCircadianModulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"](UnstableCircadianModulatorParams);\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator];\n }\n\n AddToAugmentations(UnstableCircadianModulator); //Combat stat augmentations\n\n const HemoRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator];\n }\n\n AddToAugmentations(HemoRecirculator);\n const Targeting1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info: \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" + \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1\n });\n Targeting1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1];\n }\n\n AddToAugmentations(Targeting1);\n const Targeting2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info: \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" + \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1],\n dexterity_mult: 1.2\n });\n Targeting2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2];\n }\n\n AddToAugmentations(Targeting2);\n const Targeting3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to \" + \"lock-on and track threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2],\n dexterity_mult: 1.3\n });\n Targeting3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3];\n }\n\n AddToAugmentations(Targeting3);\n const SyntheticHeart = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info: \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" + \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5\n });\n SyntheticHeart.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart];\n }\n\n AddToAugmentations(SyntheticHeart);\n const SynfibrilMuscle = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info: \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" + \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" + \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3\n });\n SynfibrilMuscle.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle];\n }\n\n AddToAugmentations(SynfibrilMuscle);\n const CombatRib1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info: \"The rib cage is augmented to continuously release boosters into the bloodstream \" + \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1\n });\n CombatRib1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1];\n }\n\n AddToAugmentations(CombatRib1);\n const CombatRib2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info: \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" + \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14\n });\n CombatRib2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2];\n }\n\n AddToAugmentations(CombatRib2);\n const CombatRib3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info: \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" + \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18\n });\n CombatRib3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3];\n }\n\n AddToAugmentations(CombatRib3);\n const NanofiberWeave = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info: \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" + \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2\n });\n NanofiberWeave.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"Blade Industries\", \"Fulcrum Secret Technologies\", \"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave];\n }\n\n AddToAugmentations(NanofiberWeave);\n const SubdermalArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info: \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" + \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" + \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" + \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" + \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2\n });\n SubdermalArmor.addToFactions([\"The Syndicate\", \"Fulcrum Secret Technologies\", \"Illuminati\", \"Daedalus\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor];\n }\n\n AddToAugmentations(SubdermalArmor);\n const WiredReflexes = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info: \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" + \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05\n });\n WiredReflexes.addToFactions([\"Tian Di Hui\", \"Slum Snakes\", \"Sector-12\", \"Volhaven\", \"Aevum\", \"Ishima\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes];\n }\n\n AddToAugmentations(WiredReflexes);\n const GrapheneBoneLacings = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings];\n }\n\n AddToAugmentations(GrapheneBoneLacings);\n const BionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info: \"The spine is reconstructed using plasteel and carbon fibers. \" + \"It is now capable of stimulating and regulating neural signals \" + \"passing through the spinal cord, improving senses and reaction speed. \" + \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15\n });\n BionicSpine.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine];\n }\n\n AddToAugmentations(BionicSpine);\n const GrapheneBionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info: \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" + \"which enhances durability and supercharges all body functions.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine];\n }\n\n AddToAugmentations(GrapheneBionicSpine);\n const BionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6\n });\n BionicLegs.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs];\n }\n\n AddToAugmentations(BionicLegs);\n const GrapheneBionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info: \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" + \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs],\n agility_mult: 2.5\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs];\n }\n\n AddToAugmentations(GrapheneBionicLegs); // Work stat augmentations\n\n const SpeechProcessor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info: \"A cochlear implant with an embedded computer that analyzes incoming speech. \" + \"The embedded computer processes characteristics of incoming speech, such as tone \" + \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2\n });\n SpeechProcessor.addToFactions([\"Tian Di Hui\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor];\n }\n\n AddToAugmentations(SpeechProcessor);\n const TITN41Injection = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info: \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" + \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" + \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection];\n }\n\n AddToAugmentations(TITN41Injection);\n const EnhancedSocialInteractionImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info: \"A cranial implant that greatly assists in the user's ability to analyze social situations \" + \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" + \"language, and the voice tone, and inflection to determine the best course of action during social\" + \"situations. The implant also uses deep learning software to continuously learn new behavior\" + \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6\n });\n EnhancedSocialInteractionImplant.addToFactions([\"Bachman & Associates\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant];\n }\n\n AddToAugmentations(EnhancedSocialInteractionImplant); // Hacking augmentations\n\n const BitWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info: \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" + \"capabilities.\",\n hacking_mult: 1.05\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire];\n }\n\n AddToAugmentations(BitWire);\n const ArtificialBioNeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info: \"A network consisting of millions of nanoprocessors is embedded into the brain. \" + \"The network is meant to mimic the way a biological brain solves a problem, with each \" + \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" + \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" + \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork];\n }\n\n AddToAugmentations(ArtificialBioNeuralNetwork);\n const ArtificialSynapticPotentiation = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info: \"The body is injected with a chemical that artificially induces synaptic potentiation, \" + \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation];\n }\n\n AddToAugmentations(ArtificialSynapticPotentiation);\n const EnhancedMyelinSheathing = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info: \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" + \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" + \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" + \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing];\n }\n\n AddToAugmentations(EnhancedMyelinSheathing);\n const SynapticEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info: \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" + \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement];\n }\n\n AddToAugmentations(SynapticEnhancement);\n const NeuralRetentionEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info: \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" + \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement];\n }\n\n AddToAugmentations(NeuralRetentionEnhancement);\n const DataJack = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info: \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" + \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" + \"and delete it.\",\n hacking_money_mult: 1.25\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack];\n }\n\n AddToAugmentations(DataJack);\n const ENM = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info: \"A thin device embedded inside the arm containing a wireless module capable of connecting \" + \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" + \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" + \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" + \"control the traffic on a network.\",\n hacking_mult: 1.08\n });\n ENM.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM];\n }\n\n AddToAugmentations(ENM);\n const ENMCore = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore,\n repCost: 2.5e5,\n moneyCost: 2.5e9,\n info: \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07\n });\n ENMCore.addToFactions([\"BitRunners\", \"The Black Hand\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore];\n }\n\n AddToAugmentations(ENMCore);\n const ENMCoreV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info: \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to control information on \" + \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" + \"packets.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08\n });\n ENMCoreV2.addToFactions([\"BitRunners\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\", \"OmniTek Incorporated\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2];\n }\n\n AddToAugmentations(ENMCoreV2);\n const ENMCoreV3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info: \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" + \"any device on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1\n });\n ENMCoreV3.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3];\n }\n\n AddToAugmentations(ENMCoreV3);\n const ENMAnalyzeEngine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info: \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" + \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.1\n });\n ENMAnalyzeEngine.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine];\n }\n\n AddToAugmentations(ENMAnalyzeEngine);\n const ENMDMA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info: \"This implant installs a Direct Memory Access (DMA) controller into the \" + \"Embedded Netburner Module. This allows the Module to send and receive data \" + \"directly to and from the main memory of devices on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2\n });\n ENMDMA.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA];\n }\n\n AddToAugmentations(ENMDMA);\n const Neuralstimulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info: \"A cranial implant that intelligently stimulates certain areas of the brain \" + \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12\n });\n Neuralstimulator.addToFactions([\"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator];\n }\n\n AddToAugmentations(Neuralstimulator);\n const NeuralAccelerator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info: \"A microprocessor that accelerates the processing \" + \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator];\n }\n\n AddToAugmentations(NeuralAccelerator);\n const CranialSignalProcessorsG1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info: \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1];\n }\n\n AddToAugmentations(CranialSignalProcessorsG1);\n const CranialSignalProcessorsG2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info: \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2];\n }\n\n AddToAugmentations(CranialSignalProcessorsG2);\n const CranialSignalProcessorsG3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info: \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3];\n }\n\n AddToAugmentations(CranialSignalProcessorsG3);\n const CranialSignalProcessorsG4 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info: \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4];\n }\n\n AddToAugmentations(CranialSignalProcessorsG4);\n const CranialSignalProcessorsG5 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info: \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5];\n }\n\n AddToAugmentations(CranialSignalProcessorsG5);\n const NeuronalDensification = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info: \"The brain is surgically re-engineered to have increased neuronal density \" + \"by decreasing the neuron gap junction. Then, the body is genetically modified \" + \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification];\n }\n\n AddToAugmentations(NeuronalDensification); // Work Augmentations\n\n const NuoptimalInjectorImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info: \"This torso implant automatically injects nootropic supplements into \" + \"the bloodstream to improve memory, increase focus, and provide other \" + \"cognitive enhancements.\",\n company_rep_mult: 1.2\n });\n NuoptimalInjectorImplant.addToFactions([\"Tian Di Hui\", \"Volhaven\", \"New Tokyo\", \"Chongqing\", \"Clarke Incorporated\", \"Four Sigma\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant];\n }\n\n AddToAugmentations(NuoptimalInjectorImplant);\n const SpeechEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info: \"An advanced neural implant that improves your speaking abilities, making \" + \"you more convincing and likable in conversations and overall improving your \" + \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1\n });\n SpeechEnhancement.addToFactions([\"Tian Di Hui\", \"Speakers for the Dead\", \"Four Sigma\", \"KuaiGong International\", \"Clarke Incorporated\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement];\n }\n\n AddToAugmentations(SpeechEnhancement);\n const FocusWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire];\n }\n\n AddToAugmentations(FocusWire);\n const PCDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info: \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" + \"computers. Connecting to a computer through this jack allows you to interface with \" + \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI];\n }\n\n AddToAugmentations(PCDNI);\n const PCDNIOptimizer = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info: \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" + \"improves the performance of the interface and gives the user more control options \" + \"to a connected computer.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer];\n }\n\n AddToAugmentations(PCDNIOptimizer);\n const PCDNINeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info: \"This is an additional installation that upgrades the functionality of the \" + \"PC Direct-Neural Interface augmentation. When connected to a computer, \" + \"The Neural Network upgrade allows the user to use their own brain's \" + \"processing power to aid the computer in computational tasks.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork];\n }\n\n AddToAugmentations(PCDNINeuralNetwork);\n const ADRPheromone1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info: \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" + \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" + \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1];\n }\n\n AddToAugmentations(ADRPheromone1);\n const ADRPheromone2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info: \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" + \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" + \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2];\n }\n\n AddToAugmentations(ADRPheromone2);\n const ShadowsSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info: \"A crude but functional matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation was developed by \" + \"criminal organizations and allows the user to project and control holographic \" + \"simulacrums within a large radius. These simulacrums are commonly used for \" + \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum];\n }\n\n AddToAugmentations(ShadowsSimulacrum); // HacknetNode Augmentations\n\n const HacknetNodeCPUUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info: \"Uploads the architecture and design details of a Hacknet Node's CPU into \" + \"the brain. This allows the user to engineer custom hardware and software \" + \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload];\n }\n\n AddToAugmentations(HacknetNodeCPUUpload);\n const HacknetNodeCacheUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" + \"into the brain. This allows the user to engineer custom cache hardware for the \" + \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload];\n }\n\n AddToAugmentations(HacknetNodeCacheUpload);\n const HacknetNodeNICUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" + \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" + \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload];\n }\n\n AddToAugmentations(HacknetNodeNICUpload);\n const HacknetNodeKernelDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" + \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI];\n }\n\n AddToAugmentations(HacknetNodeKernelDNI);\n const HacknetNodeCoreDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" + \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI];\n }\n\n AddToAugmentations(HacknetNodeCoreDNI); //Misc/Hybrid augmentations\n\n const NeuroFluxGovernor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info: \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" + \"monitors and regulates nervous impulses coming to and from the spinal column, \" + \"essentially 'governing' the body. By doing so, it improves the functionality of the \" + \"body's nervous system.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.\"),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01\n }); // Set the Augmentation's level to the currently-installed level\n\n let currLevel = 0;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level;\n }\n }\n\n NeuroFluxGovernor.level = currLevel; // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n\n let nextLevel = currLevel;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n\n let mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor];\n }\n\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n const Neurotrainer1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. It is \" + \"installed by releasing millions of nanobots into the human brain, each of which \" + \"attaches to a different neural pathway to enhance the brain's ability to retain \" + \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1];\n }\n\n AddToAugmentations(Neurotrainer1);\n const Neurotrainer2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" + \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2];\n }\n\n AddToAugmentations(Neurotrainer2);\n const Neurotrainer3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" + \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3];\n }\n\n AddToAugmentations(Neurotrainer3);\n const Hypersight = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info: \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" + \"Embedded circuitry within the implant provides the ability to detect heat and movement \" + \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight];\n }\n\n AddToAugmentations(Hypersight);\n const LuminCloaking1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info: \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, have a negative refractive index. As a result, they bend light \" + \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1];\n }\n\n AddToAugmentations(LuminCloaking1);\n const LuminCloaking2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info: \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" + \"reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, are capable of not only bending light but also of bending heat, \" + \"making the user more resilient as well as stealthy.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2];\n }\n\n AddToAugmentations(LuminCloaking2);\n const SmartSonar = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar];\n }\n\n AddToAugmentations(SmartSonar);\n const PowerRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info: \"The body's nerves are attached with polypyrrole nanocircuits that \" + \"are capable of capturing wasted energy, in the form of heat, \" + \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator];\n }\n\n AddToAugmentations(PowerRecirculator); // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n // Illuminati\n\n const QLink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info: \"A brain implant that wirelessly connects you to the Illuminati's \" + \"quantum supercomputer, allowing you to access and use its incredible \" + \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4\n });\n QLink.addToFactions([\"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink];\n }\n\n AddToAugmentations(QLink); // Daedalus\n\n const RedPill = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n RedPill.addToFactions([\"Daedalus\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill];\n }\n\n AddToAugmentations(RedPill); // Covenant\n\n const SPTN97 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info: \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" + \"artificially-synthesized gene that was developed by DARPA to create \" + \"super-soldiers through genetic modification. The gene was outlawed in \" + \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97];\n }\n\n AddToAugmentations(SPTN97); // ECorp\n\n const HiveMind = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info: \"A brain implant developed by ECorp. They do not reveal what \" + \"exactly the implant does, but they promise that it will greatly \" + \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n HiveMind.addToFactions([\"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind];\n }\n\n AddToAugmentations(HiveMind); // MegaCorp\n\n const CordiARCReactor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info: \"The thoracic cavity is equipped with a small chamber designed \" + \"to hold and sustain hydrogen plasma. The plasma is used to generate \" + \"fusion power through nuclear fusion, providing limitless amounts of clean \" + \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor];\n }\n\n AddToAugmentations(CordiARCReactor); // BachmanAndAssociates\n\n const SmartJaw = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info: \"A bionic jaw that contains advanced hardware and software \" + \"capable of psychoanalyzing and profiling the personality of \" + \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw];\n }\n\n AddToAugmentations(SmartJaw); // BladeIndustries\n\n const Neotra = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info: \"A highly-advanced techno-organic drug that is injected into the skeletal \" + \"and integumentary system. The drug permanently modifies the DNA of the \" + \"body's skin and bone cells, granting them the ability to repair \" + \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra];\n }\n\n AddToAugmentations(Neotra); // NWO\n\n const Xanipher = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info: \"A concoction of advanced nanobots that is orally ingested into the \" + \"body. These nanobots induce physiological changes and significantly \" + \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Xanipher.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher];\n }\n\n AddToAugmentations(Xanipher);\n const HydroflameLeftArm = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info: \"The left arm of a legendary BitRunner who ascended beyond this world. \" + \"It projects a light blue energy shield that protects the exposed inner parts. \" + \"Even though it contains no weapons, the advanced tungsten titanium \" + \"alloy increases the users strength to unbelievable levels. The augmentation \" + \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm];\n }\n\n AddToAugmentations(HydroflameLeftArm); // ClarkeIncorporated\n\n const nextSENS = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info: \"The body is genetically re-engineered to maintain a state \" + \"of negligible senescence, preventing the body from \" + \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS];\n }\n\n AddToAugmentations(nextSENS); // OmniTekIncorporated\n\n const OmniTekInfoLoad = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info: \"OmniTek's data and information repository is uploaded \" + \"into your brain, enhancing your programming and \" + \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad];\n }\n\n AddToAugmentations(OmniTekInfoLoad); // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n // KuaiGongInternational\n\n const PhotosyntheticCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info: \"Chloroplasts are added to epidermal stem cells and are applied \" + \"to the body using a skin graft. The result is photosynthetic \" + \"skin cells, allowing users to generate their own energy \" + \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells];\n }\n\n AddToAugmentations(PhotosyntheticCells); // BitRunners\n\n const Neurolink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info: \"A brain implant that provides a high-bandwidth, direct neural link between your \" + \"mind and the BitRunners' data servers, which reportedly contain \" + \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].FTPCrackProgram.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].RelaySMTPProgram.name]\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink];\n }\n\n AddToAugmentations(Neurolink); // BlackHand\n\n const TheBlackHand = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info: \"A highly advanced bionic hand. This prosthetic not only \" + \"enhances strength and dexterity but it is also embedded \" + \"with hardware and firmware that lets the user connect to, access, and hack \" + \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand];\n }\n\n AddToAugmentations(TheBlackHand); // NiteSec\n\n const CRTX42AA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info: \"The CRTX42-AA gene is injected into the genome. \" + \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" + \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA];\n }\n\n AddToAugmentations(CRTX42AA); // Chongqing\n\n const Neuregen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info: \"A drug that genetically modifies the neurons in the brain \" + \"resulting in neurons never die, continuously \" + \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen];\n }\n\n AddToAugmentations(Neuregen); // Sector12\n\n const CashRoot = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.\"),\n startingMoney: 1e6,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].BruteSSHProgram.name]\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot];\n }\n\n AddToAugmentations(CashRoot); // NewTokyo\n\n const NutriGen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info: \"A thermo-powered artificial nutrition generator. Endogenously \" + \"synthesizes glucose, amino acids, and vitamins and redistributes them \" + \"across the body. The device is powered by the body's naturally wasted \" + \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen];\n }\n\n AddToAugmentations(NutriGen); // Aevum\n\n const PCMatrix = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info: \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" + \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" + \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].DeepscanV1.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].AutoLink.name]\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix];\n }\n\n AddToAugmentations(PCMatrix); // Ishima\n\n const INFRARet = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1\n });\n INFRARet.addToFactions([\"Ishima\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet];\n }\n\n AddToAugmentations(INFRARet); // Volhaven\n\n const DermaForce = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info: \"Synthetic skin that is grafted onto the body. This skin consists of \" + \"millions of nanobots capable of projecting high-density muon beams, \" + \"creating an energy barrier around the user.\",\n defense_mult: 1.4\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce];\n }\n\n AddToAugmentations(DermaForce); // SpeakersForTheDead\n\n const GrapheneBrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info: \"An upgrade to the BrachiBlades augmentation. It infuses \" + \"the retractable blades with an advanced graphene material \" + \"making them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades];\n }\n\n AddToAugmentations(GrapheneBrachiBlades); // DarkArmy\n\n const GrapheneBionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info: \"An upgrade to the Bionic Arms augmentation. It infuses the \" + \"prosthetic arms with an advanced graphene material \" + \"to make them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms];\n }\n\n AddToAugmentations(GrapheneBionicArms); // TheSyndicate\n\n const BrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades];\n }\n\n AddToAugmentations(BrachiBlades); // Tetrads\n\n const BionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms];\n }\n\n AddToAugmentations(BionicArms); // TianDiHui\n\n const SNA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info: \"A cranial implant that affects the user's personality, making them better \" + \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA];\n }\n\n AddToAugmentations(SNA); // Special Bladeburner Augmentations\n\n const BladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* factionExists */ \"b\"])(BladeburnersFactionName)) {\n const EsperEyewear = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info: \"Ballistic-grade protective and retractable eyewear that was designed specifically \" + \"for Bladeburner units. This \" + \"is implanted by installing a mechanical frame in the skull's orbit. \" + \"This frame interfaces with the brain and allows the user to \" + \"automatically extrude and extract the eyewear. The eyewear protects \" + \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" + \"embedded with a data processing chip that can be programmed to display an \" + \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n const EMS4Recombination = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info: \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" + \"technique was originally used on Bladeburners during the Synthoid uprising \" + \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" + \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n const OrionShoulder = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info: \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" + \"the ORION-MKIV shoulder enhances the strength and dexterity \" + \"of the user's right arm. It also provides protection due to its \" + \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n const HyperionV1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info: \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" + \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" + \"be used against augmented enemies as the ionized \" + \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" + \"it can also be effective against non-augmented enemies due to its high temperature \" + \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n const HyperionV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"A pair of mini plasma cannons embedded into the hands. This augmentation \" + \"is more advanced and powerful than the original V1 model. This V2 model is \" + \"more power-efficient, more accurate, and can fire plasma bolts at a much \" + \"higher velocity than the V1 model.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n const GolemSerum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info: \"A serum that permanently enhances many aspects of human capabilities, \" + \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" + \"serum was originally developed by the Chinese military in an attempt to \" + \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n const VangelisVirus = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" + \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n const VangelisVirus3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info: \"An improved version of Vangelis, a synthetic symbiotic virus that is \" + \"injected into human brain tissue. On top of the benefits of the original \" + \"virus, this also grants an accelerated healing factor and enhanced \" + \"reflexes.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n const INTERLINKED = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"The DNA is genetically modified to enhance the human's body \" + \"extracellular matrix (ECM). This improves the ECM's ability to \" + \"structurally support the body and grants heightened strength and \" + \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n const BladeRunner = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info: \"A cybernetic foot augmentation that was specifically created for Bladeburners \" + \"during the Synthoid Uprising. The organic musculature of the human foot \" + \"is enhanced with flexible carbon nanotube matrices that are controlled by \" + \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n const BladeArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info: \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" + \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" + \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" + \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n const BladeArmorPowerCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" + \"more efficiently storing and using power.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n const BladeArmorEnergyShielding = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" + \"that is capable of projecting an energy shielding force field.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n const BladeArmorUnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info: \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" + \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" + \"threats while keeping casualties to a minimum.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n const BladeArmorOmnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info: \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" + \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" + \"modules that combine together to form a single, more powerful beam of up to \" + \"2000MW.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n const BladeArmorIPU = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" + \"Unit that was specially designed to analyze Synthoid related data and \" + \"information.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n const BladesSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info: \"A highly-advanced matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation allows \" + \"the user to project and control a holographic simulacrum within an \" + \"extremely large radius. These specially-modified holograms were specifically \" + \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.\"),\n isSpecial: true\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n } // Update costs based on how many have been purchased\n\n\n mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__[/* SourceFileFlags */ \"a\"][11]], _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length);\n\n for (var name in _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n if (_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name].baseCost *= mult;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].reapplyAllAugmentations();\n} //Resets an Augmentation during (re-initizliation)\n\n\nfunction resetAugmentation(newAugObject) {\n if (!(newAugObject instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"])) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n\n var name = newAugObject.name;\n\n if (augmentationExists(name)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name];\n }\n\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug, reapply = false) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].owned = true;\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name]; // Apply multipliers\n\n for (const mult in augObj.mults) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] *= augObj.mults[mult];\n }\n } // Special logic for NeuroFlux Governor\n\n\n if (aug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n if (!reapply) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].level = aug.level;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name == _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level = aug.level;\n return; // break;\n }\n }\n }\n } // Push onto Player's Augmentation list\n\n\n if (!reapply) {\n var ownedAug = new _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations() {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length == 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n\n let augmentationList = \"\";\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i];\n const aug = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i]);\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n let level = \"\";\n\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n\n augmentationList += aug.name + level + \"
\";\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations = [];\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You slowly drift to sleep as scientists put you under in order \" + \"to install the following Augmentations:
\" + augmentationList + \"
You wake up in your home...you feel different...\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_8__[/* prestigeAugmentation */ \"a\"])();\n}\n\nfunction augmentationExists(name) {\n return _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name);\n}\n\nfunction isRepeatableAug(aug) {\n const augName = aug instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n if (augName === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack:///./src/Augmentation/AugmentationHelpers.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return isRepeatableAug; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return installAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applyAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return augmentationExists; });\n/* harmony import */ var _Augmentation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation */ 28);\n/* harmony import */ var _Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentations */ 20);\n/* harmony import */ var _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Prestige */ 275);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/clearObject */ 716);\n/* harmony import */ var _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Casino/RNG */ 279);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_14__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction AddToAugmentations(aug) {\n var name = aug.name;\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name] = aug;\n}\n\nfunction getRandomBonus() {\n var bonuses = [{\n bonuses: {\n hacking_chance_mult: 1.25,\n hacking_speed_mult: 1.1,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.1\n },\n description: \"Increases the player's hacking chance by 25%.
\" + \"Increases the player's hacking speed by 10%.
\" + \"Increases the amount of money the player's gains from hacking by 25%.
\" + \"Improves grow() by 10%.\"\n }, {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2\n },\n description: \"Increases the player's hacking skill by 15%.
\" + \"Increases the player's hacking experience gain rate by 100%.\"\n }, {\n bonuses: {\n strength_mult: 1.25,\n strength_exp_mult: 2,\n defense_mult: 1.25,\n defense_exp_mult: 2,\n dexterity_mult: 1.25,\n dexterity_exp_mult: 2,\n agility_mult: 1.25,\n agility_exp_mult: 2\n },\n description: \"Increases all of the player's combat stats by 25%.
\" + \"Increases all of the player's combat stat experience gain rate by 100%.\"\n }, {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2\n },\n description: \"This augmentation increases the player's charisma by 50%.
\" + \"Increases the player's charisma experience gain rate by 100%.\"\n }, {\n bonuses: {\n hacknet_node_money_mult: 1.2,\n hacknet_node_purchase_cost_mult: 0.85,\n hacknet_node_ram_cost_mult: 0.85,\n hacknet_node_core_cost_mult: 0.85,\n hacknet_node_level_cost_mult: 0.85\n },\n description: \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" + \"Decreases all costs related to Hacknet Node by 15%.\"\n }, {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7\n },\n description: \"Increases the amount of money the player gains from working by 70%.
\" + \"Increases the amount of reputation the player gains when working for a company by 25%.
\" + \"Increases the amount of reputation the player gains for a faction by 15%.\"\n }, {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2\n },\n description: \"Increases the player's crime success rate by 100%.
\" + \"Increases the amount of money the player gains from crimes by 100%.\"\n }];\n const randomNumber = new _Casino_RNG__WEBPACK_IMPORTED_MODULE_13__[/* WHRNG */ \"b\"](Math.floor(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].lastUpdate / 3600000));\n\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nfunction initAugmentations() {\n for (var name in _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"].hasOwnProperty(name)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* Factions */ \"a\"][name].augmentations = [];\n }\n } //Reset Augmentations\n\n\n Object(_utils_helpers_clearObject__WEBPACK_IMPORTED_MODULE_12__[/* clearObject */ \"a\"])(_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]); //Time-Based Augment Test\n\n const randomBonuses = getRandomBonus();\n const UnstableCircadianModulatorParams = {\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info: \"An experimental nanobot injection. Its unstable nature leads to \" + \"unpredictable results based on your circadian rhythm.\"\n };\n Object.keys(randomBonuses.bonuses).forEach(key => UnstableCircadianModulatorParams[key] = randomBonuses.bonuses[key]);\n const UnstableCircadianModulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"](UnstableCircadianModulatorParams);\n UnstableCircadianModulator.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].UnstableCircadianModulator];\n }\n\n AddToAugmentations(UnstableCircadianModulator); //Combat stat augmentations\n\n const HemoRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator,\n moneyCost: 4.5e7,\n repCost: 1e4,\n info: \"A heart implant that greatly increases the body's ability to effectively use and pump \" + \"blood.\",\n strength_mult: 1.08,\n defense_mult: 1.08,\n agility_mult: 1.08,\n dexterity_mult: 1.08\n });\n HemoRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HemoRecirculator];\n }\n\n AddToAugmentations(HemoRecirculator);\n const Targeting1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info: \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" + \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1\n });\n Targeting1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1];\n }\n\n AddToAugmentations(Targeting1);\n const Targeting2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info: \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" + \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting1],\n dexterity_mult: 1.2\n });\n Targeting2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Sector-12\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2];\n }\n\n AddToAugmentations(Targeting2);\n const Targeting3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3,\n moneyCost: 1.15e8,\n repCost: 2.75e4,\n info: \"The latest version of the 'Augmented Targeting' implant adds the ability to \" + \"lock-on and track threats.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting2],\n dexterity_mult: 1.3\n });\n Targeting3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Targeting3];\n }\n\n AddToAugmentations(Targeting3);\n const SyntheticHeart = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info: \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" + \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5\n });\n SyntheticHeart.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SyntheticHeart];\n }\n\n AddToAugmentations(SyntheticHeart);\n const SynfibrilMuscle = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info: \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" + \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" + \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3\n });\n SynfibrilMuscle.addToFactions([\"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Speakers for the Dead\", \"NWO\", \"The Covenant\", \"Daedalus\", \"Illuminati\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynfibrilMuscle];\n }\n\n AddToAugmentations(SynfibrilMuscle);\n const CombatRib1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info: \"The rib cage is augmented to continuously release boosters into the bloodstream \" + \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1\n });\n CombatRib1.addToFactions([\"Slum Snakes\", \"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"Ishima\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1];\n }\n\n AddToAugmentations(CombatRib1);\n const CombatRib2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info: \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" + \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14\n });\n CombatRib2.addToFactions([\"The Dark Army\", \"The Syndicate\", \"Volhaven\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2];\n }\n\n AddToAugmentations(CombatRib2);\n const CombatRib3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info: \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" + \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18\n });\n CombatRib3.addToFactions([\"The Dark Army\", \"The Syndicate\", \"OmniTek Incorporated\", \"KuaiGong International\", \"Blade Industries\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CombatRib3];\n }\n\n AddToAugmentations(CombatRib3);\n const NanofiberWeave = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info: \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" + \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2\n });\n NanofiberWeave.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"Blade Industries\", \"Fulcrum Secret Technologies\", \"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NanofiberWeave];\n }\n\n AddToAugmentations(NanofiberWeave);\n const SubdermalArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info: \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" + \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" + \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" + \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" + \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2\n });\n SubdermalArmor.addToFactions([\"The Syndicate\", \"Fulcrum Secret Technologies\", \"Illuminati\", \"Daedalus\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SubdermalArmor];\n }\n\n AddToAugmentations(SubdermalArmor);\n const WiredReflexes = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info: \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" + \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05\n });\n WiredReflexes.addToFactions([\"Tian Di Hui\", \"Slum Snakes\", \"Sector-12\", \"Volhaven\", \"Aevum\", \"Ishima\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].WiredReflexes];\n }\n\n AddToAugmentations(WiredReflexes);\n const GrapheneBoneLacings = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings,\n repCost: 1.125e6,\n moneyCost: 4.25e9,\n info: \"Graphene is grafted and fused into the skeletal structure, \" + \"enhancing bone density and tensile strength.\",\n strength_mult: 1.7,\n defense_mult: 1.7\n });\n GrapheneBoneLacings.addToFactions([\"Fulcrum Secret Technologies\", \"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBoneLacings];\n }\n\n AddToAugmentations(GrapheneBoneLacings);\n const BionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info: \"The spine is reconstructed using plasteel and carbon fibers. \" + \"It is now capable of stimulating and regulating neural signals \" + \"passing through the spinal cord, improving senses and reaction speed. \" + \"The 'Bionic Spine' also interfaces with all other 'Bionic' implants.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n agility_mult: 1.15,\n dexterity_mult: 1.15\n });\n BionicSpine.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine];\n }\n\n AddToAugmentations(BionicSpine);\n const GrapheneBionicSpine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info: \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" + \"which enhances durability and supercharges all body functions.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6\n });\n GrapheneBionicSpine.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicSpine];\n }\n\n AddToAugmentations(GrapheneBionicSpine);\n const BionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs,\n repCost: 1.5e5,\n moneyCost: 3.75e8,\n info: \"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.\",\n agility_mult: 1.6\n });\n BionicLegs.addToFactions([\"Speakers for the Dead\", \"The Syndicate\", \"KuaiGong International\", \"OmniTek Incorporated\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs];\n }\n\n AddToAugmentations(BionicLegs);\n const GrapheneBionicLegs = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info: \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" + \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicLegs],\n agility_mult: 2.5\n });\n GrapheneBionicLegs.addToFactions([\"MegaCorp\", \"ECorp\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicLegs];\n }\n\n AddToAugmentations(GrapheneBionicLegs); // Work stat augmentations\n\n const SpeechProcessor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info: \"A cochlear implant with an embedded computer that analyzes incoming speech. \" + \"The embedded computer processes characteristics of incoming speech, such as tone \" + \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2\n });\n SpeechProcessor.addToFactions([\"Tian Di Hui\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechProcessor];\n }\n\n AddToAugmentations(SpeechProcessor);\n const TITN41Injection = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info: \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" + \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" + \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n TITN41Injection.addToFactions([\"Silhouette\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TITN41Injection];\n }\n\n AddToAugmentations(TITN41Injection);\n const EnhancedSocialInteractionImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info: \"A cranial implant that greatly assists in the user's ability to analyze social situations \" + \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" + \"language, and the voice tone, and inflection to determine the best course of action during social\" + \"situations. The implant also uses deep learning software to continuously learn new behavior\" + \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6\n });\n EnhancedSocialInteractionImplant.addToFactions([\"Bachman & Associates\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedSocialInteractionImplant];\n }\n\n AddToAugmentations(EnhancedSocialInteractionImplant); // Hacking augmentations\n\n const BitWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info: \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" + \"capabilities.\",\n hacking_mult: 1.05\n });\n BitWire.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BitWire];\n }\n\n AddToAugmentations(BitWire);\n const ArtificialBioNeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info: \"A network consisting of millions of nanoprocessors is embedded into the brain. \" + \"The network is meant to mimic the way a biological brain solves a problem, with each \" + \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" + \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" + \"allowing the user to solve much more complex problems at a much faster rate.\",\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.15,\n hacking_mult: 1.12\n });\n ArtificialBioNeuralNetwork.addToFactions([\"BitRunners\", \"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialBioNeuralNetwork];\n }\n\n AddToAugmentations(ArtificialBioNeuralNetwork);\n const ArtificialSynapticPotentiation = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info: \"The body is injected with a chemical that artificially induces synaptic potentiation, \" + \"otherwise known as the strengthening of synapses. This results in enhanced cognitive abilities.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.05\n });\n ArtificialSynapticPotentiation.addToFactions([\"The Black Hand\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ArtificialSynapticPotentiation];\n }\n\n AddToAugmentations(ArtificialSynapticPotentiation);\n const EnhancedMyelinSheathing = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info: \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" + \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" + \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" + \"counterparts, leading to greater processing speeds and better brain function.\",\n hacking_speed_mult: 1.03,\n hacking_exp_mult: 1.1,\n hacking_mult: 1.08\n });\n EnhancedMyelinSheathing.addToFactions([\"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EnhancedMyelinSheathing];\n }\n\n AddToAugmentations(EnhancedMyelinSheathing);\n const SynapticEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info: \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" + \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03\n });\n SynapticEnhancement.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SynapticEnhancement];\n }\n\n AddToAugmentations(SynapticEnhancement);\n const NeuralRetentionEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info: \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" + \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25\n });\n NeuralRetentionEnhancement.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralRetentionEnhancement];\n }\n\n AddToAugmentations(NeuralRetentionEnhancement);\n const DataJack = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info: \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" + \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" + \"and delete it.\",\n hacking_money_mult: 1.25\n });\n DataJack.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DataJack];\n }\n\n AddToAugmentations(DataJack);\n const ENM = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info: \"A thin device embedded inside the arm containing a wireless module capable of connecting \" + \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" + \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" + \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" + \"control the traffic on a network.\",\n hacking_mult: 1.08\n });\n ENM.addToFactions([\"BitRunners\", \"The Black Hand\", \"NiteSec\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM];\n }\n\n AddToAugmentations(ENM);\n const ENMCore = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore,\n repCost: 2.5e5,\n moneyCost: 2.5e9,\n info: \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1,\n hacking_chance_mult: 1.03,\n hacking_exp_mult: 1.07,\n hacking_mult: 1.07\n });\n ENMCore.addToFactions([\"BitRunners\", \"The Black Hand\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore];\n }\n\n AddToAugmentations(ENMCore);\n const ENMCoreV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info: \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to control information on \" + \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" + \"packets.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCore],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.3,\n hacking_chance_mult: 1.05,\n hacking_exp_mult: 1.15,\n hacking_mult: 1.08\n });\n ENMCoreV2.addToFactions([\"BitRunners\", \"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Blade Industries\", \"OmniTek Incorporated\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2];\n }\n\n AddToAugmentations(ENMCoreV2);\n const ENMCoreV3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info: \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" + \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" + \"any device on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV2],\n hacking_speed_mult: 1.05,\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.25,\n hacking_mult: 1.1\n });\n ENMCoreV3.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMCoreV3];\n }\n\n AddToAugmentations(ENMCoreV3);\n const ENMAnalyzeEngine = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info: \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" + \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_speed_mult: 1.1\n });\n ENMAnalyzeEngine.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMAnalyzeEngine];\n }\n\n AddToAugmentations(ENMAnalyzeEngine);\n const ENMDMA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info: \"This implant installs a Direct Memory Access (DMA) controller into the \" + \"Embedded Netburner Module. This allows the Module to send and receive data \" + \"directly to and from the main memory of devices on a network.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2\n });\n ENMDMA.addToFactions([\"ECorp\", \"MegaCorp\", \"Fulcrum Secret Technologies\", \"NWO\", \"Daedalus\", \"The Covenant\", \"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ENMDMA];\n }\n\n AddToAugmentations(ENMDMA);\n const Neuralstimulator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info: \"A cranial implant that intelligently stimulates certain areas of the brain \" + \"in order to improve cognitive functions.\",\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.1,\n hacking_exp_mult: 1.12\n });\n Neuralstimulator.addToFactions([\"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuralstimulator];\n }\n\n AddToAugmentations(Neuralstimulator);\n const NeuralAccelerator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info: \"A microprocessor that accelerates the processing \" + \"speed of biological neural networks. This is a cranial implant that is embedded inside the brain.\",\n hacking_mult: 1.1,\n hacking_exp_mult: 1.15,\n hacking_money_mult: 1.2\n });\n NeuralAccelerator.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuralAccelerator];\n }\n\n AddToAugmentations(NeuralAccelerator);\n const CranialSignalProcessorsG1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info: \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05\n });\n CranialSignalProcessorsG1.addToFactions([\"CyberSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1];\n }\n\n AddToAugmentations(CranialSignalProcessorsG1);\n const CranialSignalProcessorsG2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info: \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07\n });\n CranialSignalProcessorsG2.addToFactions([\"CyberSec\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2];\n }\n\n AddToAugmentations(CranialSignalProcessorsG2);\n const CranialSignalProcessorsG3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info: \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09\n });\n CranialSignalProcessorsG3.addToFactions([\"NiteSec\", \"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3];\n }\n\n AddToAugmentations(CranialSignalProcessorsG3);\n const CranialSignalProcessorsG4 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info: \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25\n });\n CranialSignalProcessorsG4.addToFactions([\"The Black Hand\", \"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4];\n }\n\n AddToAugmentations(CranialSignalProcessorsG4);\n const CranialSignalProcessorsG5 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info: \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" + \"are a set of specialized microprocessors that are attached to \" + \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" + \"so that the brain doesn't have to.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75\n });\n CranialSignalProcessorsG5.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CranialSignalProcessorsG5];\n }\n\n AddToAugmentations(CranialSignalProcessorsG5);\n const NeuronalDensification = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info: \"The brain is surgically re-engineered to have increased neuronal density \" + \"by decreasing the neuron gap junction. Then, the body is genetically modified \" + \"to enhance the production and capabilities of its neural stem cells.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.1,\n hacking_speed_mult: 1.03\n });\n NeuronalDensification.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuronalDensification];\n }\n\n AddToAugmentations(NeuronalDensification); // Work Augmentations\n\n const NuoptimalInjectorImplant = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info: \"This torso implant automatically injects nootropic supplements into \" + \"the bloodstream to improve memory, increase focus, and provide other \" + \"cognitive enhancements.\",\n company_rep_mult: 1.2\n });\n NuoptimalInjectorImplant.addToFactions([\"Tian Di Hui\", \"Volhaven\", \"New Tokyo\", \"Chongqing\", \"Clarke Incorporated\", \"Four Sigma\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NuoptimalInjectorImplant];\n }\n\n AddToAugmentations(NuoptimalInjectorImplant);\n const SpeechEnhancement = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info: \"An advanced neural implant that improves your speaking abilities, making \" + \"you more convincing and likable in conversations and overall improving your \" + \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1\n });\n SpeechEnhancement.addToFactions([\"Tian Di Hui\", \"Speakers for the Dead\", \"Four Sigma\", \"KuaiGong International\", \"Clarke Incorporated\", \"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SpeechEnhancement];\n }\n\n AddToAugmentations(SpeechEnhancement);\n const FocusWire = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire,\n repCost: 7.5e4,\n moneyCost: 9e8,\n info: \"A cranial implant that stops procrastination by blocking specific neural pathways \" + \"in the brain.\",\n hacking_exp_mult: 1.05,\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n charisma_exp_mult: 1.05,\n company_rep_mult: 1.1,\n work_money_mult: 1.2\n });\n FocusWire.addToFactions([\"Bachman & Associates\", \"Clarke Incorporated\", \"Four Sigma\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].FocusWire];\n }\n\n AddToAugmentations(FocusWire);\n const PCDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info: \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" + \"computers. Connecting to a computer through this jack allows you to interface with \" + \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08\n });\n PCDNI.addToFactions([\"Four Sigma\", \"OmniTek Incorporated\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI];\n }\n\n AddToAugmentations(PCDNI);\n const PCDNIOptimizer = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info: \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" + \"improves the performance of the interface and gives the user more control options \" + \"to a connected computer.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1\n });\n PCDNIOptimizer.addToFactions([\"Fulcrum Secret Technologies\", \"ECorp\", \"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNIOptimizer];\n }\n\n AddToAugmentations(PCDNIOptimizer);\n const PCDNINeuralNetwork = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info: \"This is an additional installation that upgrades the functionality of the \" + \"PC Direct-Neural Interface augmentation. When connected to a computer, \" + \"The Neural Network upgrade allows the user to use their own brain's \" + \"processing power to aid the computer in computational tasks.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05\n });\n PCDNINeuralNetwork.addToFactions([\"Fulcrum Secret Technologies\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCDNINeuralNetwork];\n }\n\n AddToAugmentations(PCDNINeuralNetwork);\n const ADRPheromone1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info: \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" + \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" + \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1\n });\n ADRPheromone1.addToFactions([\"Tian Di Hui\", \"The Syndicate\", \"NWO\", \"MegaCorp\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone1];\n }\n\n AddToAugmentations(ADRPheromone1);\n const ADRPheromone2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info: \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" + \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" + \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2\n });\n ADRPheromone2.addToFactions([\"Silhouette\", \"Four Sigma\", \"Bachman & Associates\", \"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ADRPheromone2];\n }\n\n AddToAugmentations(ADRPheromone2);\n const ShadowsSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info: \"A crude but functional matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation was developed by \" + \"criminal organizations and allows the user to project and control holographic \" + \"simulacrums within a large radius. These simulacrums are commonly used for \" + \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n ShadowsSimulacrum.addToFactions([\"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].ShadowsSimulacrum];\n }\n\n AddToAugmentations(ShadowsSimulacrum); // HacknetNode Augmentations\n\n const HacknetNodeCPUUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info: \"Uploads the architecture and design details of a Hacknet Node's CPU into \" + \"the brain. This allows the user to engineer custom hardware and software \" + \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85\n });\n HacknetNodeCPUUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCPUUpload];\n }\n\n AddToAugmentations(HacknetNodeCPUUpload);\n const HacknetNodeCacheUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" + \"into the brain. This allows the user to engineer custom cache hardware for the \" + \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85\n });\n HacknetNodeCacheUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCacheUpload];\n }\n\n AddToAugmentations(HacknetNodeCacheUpload);\n const HacknetNodeNICUpload = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info: \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" + \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" + \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9\n });\n HacknetNodeNICUpload.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeNICUpload];\n }\n\n AddToAugmentations(HacknetNodeNICUpload);\n const HacknetNodeKernelDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" + \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25\n });\n HacknetNodeKernelDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeKernelDNI];\n }\n\n AddToAugmentations(HacknetNodeKernelDNI);\n const HacknetNodeCoreDNI = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info: \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" + \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" + \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45\n });\n HacknetNodeCoreDNI.addToFactions([\"Netburners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HacknetNodeCoreDNI];\n }\n\n AddToAugmentations(HacknetNodeCoreDNI); //Misc/Hybrid augmentations\n\n const NeuroFluxGovernor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n repCost: 1.25e3,\n moneyCost: 3.75e6,\n info: \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" + \"monitors and regulates nervous impulses coming to and from the spinal column, \" + \"essentially 'governing' the body. By doing so, it improves the functionality of the \" + \"body's nervous system.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This special augmentation can be leveled up infinitely. Each level of this augmentation increases ALL multipliers by 1%, stacking multiplicatively.\"),\n hacking_chance_mult: 1.01,\n hacking_speed_mult: 1.01,\n hacking_money_mult: 1.01,\n hacking_grow_mult: 1.01,\n hacking_mult: 1.01,\n strength_mult: 1.01,\n defense_mult: 1.01,\n dexterity_mult: 1.01,\n agility_mult: 1.01,\n charisma_mult: 1.01,\n hacking_exp_mult: 1.01,\n strength_exp_mult: 1.01,\n defense_exp_mult: 1.01,\n dexterity_exp_mult: 1.01,\n agility_exp_mult: 1.01,\n charisma_exp_mult: 1.01,\n company_rep_mult: 1.01,\n faction_rep_mult: 1.01,\n crime_money_mult: 1.01,\n crime_success_mult: 1.01,\n hacknet_node_money_mult: 1.01,\n hacknet_node_purchase_cost_mult: 0.99,\n hacknet_node_ram_cost_mult: 0.99,\n hacknet_node_core_cost_mult: 0.99,\n hacknet_node_level_cost_mult: 0.99,\n work_money_mult: 1.01\n }); // Set the Augmentation's level to the currently-installed level\n\n let currLevel = 0;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n currLevel = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level;\n }\n }\n\n NeuroFluxGovernor.level = currLevel; // To set the price/rep req of the NeuroFlux, we have to take into account NeuroFlux\n // levels that are purchased but not yet installed\n\n let nextLevel = currLevel;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n ++nextLevel;\n }\n }\n\n let mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NeuroFluxGovernorLevelMult, nextLevel);\n NeuroFluxGovernor.baseRepRequirement = 500 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationRepCost;\n NeuroFluxGovernor.baseCost = 750e3 * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AugmentationMoneyCost;\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor];\n }\n\n NeuroFluxGovernor.addToAllFactions();\n AddToAugmentations(NeuroFluxGovernor);\n const Neurotrainer1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. It is \" + \"installed by releasing millions of nanobots into the human brain, each of which \" + \"attaches to a different neural pathway to enhance the brain's ability to retain \" + \"and retrieve information.\",\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n Neurotrainer1.addToFactions([\"CyberSec\", \"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer1];\n }\n\n AddToAugmentations(Neurotrainer1);\n const Neurotrainer2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" + \"require Neurotrainer I to be installed as a prerequisite.\",\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Neurotrainer2.addToFactions([\"BitRunners\", \"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer2];\n }\n\n AddToAugmentations(Neurotrainer2);\n const Neurotrainer3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info: \"A decentralized cranial implant that improves the brain's ability to learn. This \" + \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" + \"but it does not require either of them to be installed as a prerequisite.\",\n hacking_exp_mult: 1.2,\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2,\n charisma_exp_mult: 1.2\n });\n Neurotrainer3.addToFactions([\"NWO\", \"Four Sigma\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurotrainer3];\n }\n\n AddToAugmentations(Neurotrainer3);\n const Hypersight = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info: \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" + \"Embedded circuitry within the implant provides the ability to detect heat and movement \" + \"through solid objects such as walls, thus providing 'x-ray vision'-like capabilities.\",\n dexterity_mult: 1.4,\n hacking_speed_mult: 1.03,\n hacking_money_mult: 1.1\n });\n Hypersight.addToFactions([\"Blade Industries\", \"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Hypersight];\n }\n\n AddToAugmentations(Hypersight);\n const LuminCloaking1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info: \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, have a negative refractive index. As a result, they bend light \" + \"around the skin, making the user much harder to see to the naked eye.\",\n agility_mult: 1.05,\n crime_money_mult: 1.1\n });\n LuminCloaking1.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1];\n }\n\n AddToAugmentations(LuminCloaking1);\n const LuminCloaking2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info: \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" + \"reinforces the skin with highly-advanced synthetic cells. These \" + \"cells, when powered, are capable of not only bending light but also of bending heat, \" + \"making the user more resilient as well as stealthy.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25\n });\n LuminCloaking2.addToFactions([\"Slum Snakes\", \"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].LuminCloaking2];\n }\n\n AddToAugmentations(LuminCloaking2);\n const SmartSonar = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar,\n repCost: 2.25e4,\n moneyCost: 7.5e7,\n info: \"A cochlear implant that helps the player detect and locate enemies \" + \"using sound propagation.\",\n dexterity_mult: 1.1,\n dexterity_exp_mult: 1.15,\n crime_money_mult: 1.25\n });\n SmartSonar.addToFactions([\"Slum Snakes\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartSonar];\n }\n\n AddToAugmentations(SmartSonar);\n const PowerRecirculator = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info: \"The body's nerves are attached with polypyrrole nanocircuits that \" + \"are capable of capturing wasted energy, in the form of heat, \" + \"and converting it back into usable power.\",\n hacking_mult: 1.05,\n strength_mult: 1.05,\n defense_mult: 1.05,\n dexterity_mult: 1.05,\n agility_mult: 1.05,\n charisma_mult: 1.05,\n hacking_exp_mult: 1.1,\n strength_exp_mult: 1.1,\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n agility_exp_mult: 1.1,\n charisma_exp_mult: 1.1\n });\n PowerRecirculator.addToFactions([\"Tetrads\", \"The Dark Army\", \"The Syndicate\", \"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PowerRecirculator];\n }\n\n AddToAugmentations(PowerRecirculator); // Unique AUGS (Each Faction gets one unique augmentation)\n // Factions that already have unique augs up to this point:\n // Slum Snakes, CyberSec, Netburners, Fulcrum Secret Technologies,\n // Silhouette\n // Illuminati\n\n const QLink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info: \"A brain implant that wirelessly connects you to the Illuminati's \" + \"quantum supercomputer, allowing you to access and use its incredible \" + \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4\n });\n QLink.addToFactions([\"Illuminati\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].QLink];\n }\n\n AddToAugmentations(QLink); // Daedalus\n\n const RedPill = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n RedPill.addToFactions([\"Daedalus\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill];\n }\n\n AddToAugmentations(RedPill); // Covenant\n\n const SPTN97 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info: \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" + \"artificially-synthesized gene that was developed by DARPA to create \" + \"super-soldiers through genetic modification. The gene was outlawed in \" + \"2056.\",\n strength_mult: 1.75,\n defense_mult: 1.75,\n dexterity_mult: 1.75,\n agility_mult: 1.75,\n hacking_mult: 1.15\n });\n SPTN97.addToFactions([\"The Covenant\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SPTN97];\n }\n\n AddToAugmentations(SPTN97); // ECorp\n\n const HiveMind = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info: \"A brain implant developed by ECorp. They do not reveal what \" + \"exactly the implant does, but they promise that it will greatly \" + \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null)\n });\n HiveMind.addToFactions([\"ECorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HiveMind];\n }\n\n AddToAugmentations(HiveMind); // MegaCorp\n\n const CordiARCReactor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info: \"The thoracic cavity is equipped with a small chamber designed \" + \"to hold and sustain hydrogen plasma. The plasma is used to generate \" + \"fusion power through nuclear fusion, providing limitless amounts of clean \" + \"energy for the body.\",\n strength_mult: 1.35,\n defense_mult: 1.35,\n dexterity_mult: 1.35,\n agility_mult: 1.35,\n strength_exp_mult: 1.35,\n defense_exp_mult: 1.35,\n dexterity_exp_mult: 1.35,\n agility_exp_mult: 1.35\n });\n CordiARCReactor.addToFactions([\"MegaCorp\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CordiARCReactor];\n }\n\n AddToAugmentations(CordiARCReactor); // BachmanAndAssociates\n\n const SmartJaw = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info: \"A bionic jaw that contains advanced hardware and software \" + \"capable of psychoanalyzing and profiling the personality of \" + \"others using optical imaging software.\",\n charisma_mult: 1.5,\n charisma_exp_mult: 1.5,\n company_rep_mult: 1.25,\n faction_rep_mult: 1.25\n });\n SmartJaw.addToFactions([\"Bachman & Associates\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SmartJaw];\n }\n\n AddToAugmentations(SmartJaw); // BladeIndustries\n\n const Neotra = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info: \"A highly-advanced techno-organic drug that is injected into the skeletal \" + \"and integumentary system. The drug permanently modifies the DNA of the \" + \"body's skin and bone cells, granting them the ability to repair \" + \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55\n });\n Neotra.addToFactions([\"Blade Industries\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neotra];\n }\n\n AddToAugmentations(Neotra); // NWO\n\n const Xanipher = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info: \"A concoction of advanced nanobots that is orally ingested into the \" + \"body. These nanobots induce physiological changes and significantly \" + \"improve the body's functioning in all aspects.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2,\n hacking_exp_mult: 1.15,\n strength_exp_mult: 1.15,\n defense_exp_mult: 1.15,\n dexterity_exp_mult: 1.15,\n agility_exp_mult: 1.15,\n charisma_exp_mult: 1.15\n });\n Xanipher.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Xanipher];\n }\n\n AddToAugmentations(Xanipher);\n const HydroflameLeftArm = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info: \"The left arm of a legendary BitRunner who ascended beyond this world. \" + \"It projects a light blue energy shield that protects the exposed inner parts. \" + \"Even though it contains no weapons, the advanced tungsten titanium \" + \"alloy increases the users strength to unbelievable levels. The augmentation \" + \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7\n });\n HydroflameLeftArm.addToFactions([\"NWO\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HydroflameLeftArm];\n }\n\n AddToAugmentations(HydroflameLeftArm); // ClarkeIncorporated\n\n const nextSENS = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info: \"The body is genetically re-engineered to maintain a state \" + \"of negligible senescence, preventing the body from \" + \"deteriorating with age.\",\n hacking_mult: 1.2,\n strength_mult: 1.2,\n defense_mult: 1.2,\n dexterity_mult: 1.2,\n agility_mult: 1.2,\n charisma_mult: 1.2\n });\n nextSENS.addToFactions([\"Clarke Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].nextSENS];\n }\n\n AddToAugmentations(nextSENS); // OmniTekIncorporated\n\n const OmniTekInfoLoad = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info: \"OmniTek's data and information repository is uploaded \" + \"into your brain, enhancing your programming and \" + \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25\n });\n OmniTekInfoLoad.addToFactions([\"OmniTek Incorporated\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OmniTekInfoLoad];\n }\n\n AddToAugmentations(OmniTekInfoLoad); // FourSigma\n // TODO Later when Intelligence is added in . Some aug that greatly increases int\n // KuaiGongInternational\n\n const PhotosyntheticCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info: \"Chloroplasts are added to epidermal stem cells and are applied \" + \"to the body using a skin graft. The result is photosynthetic \" + \"skin cells, allowing users to generate their own energy \" + \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4\n });\n PhotosyntheticCells.addToFactions([\"KuaiGong International\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PhotosyntheticCells];\n }\n\n AddToAugmentations(PhotosyntheticCells); // BitRunners\n\n const Neurolink = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info: \"A brain implant that provides a high-bandwidth, direct neural link between your \" + \"mind and the BitRunners' data servers, which reportedly contain \" + \"the largest database of hacking tools and information in the world.\",\n hacking_mult: 1.15,\n hacking_exp_mult: 1.2,\n hacking_chance_mult: 1.1,\n hacking_speed_mult: 1.05,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].FTPCrackProgram.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].RelaySMTPProgram.name]\n });\n Neurolink.addToFactions([\"BitRunners\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neurolink];\n }\n\n AddToAugmentations(Neurolink); // BlackHand\n\n const TheBlackHand = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info: \"A highly advanced bionic hand. This prosthetic not only \" + \"enhances strength and dexterity but it is also embedded \" + \"with hardware and firmware that lets the user connect to, access, and hack \" + \"devices and machines by just touching them.\",\n strength_mult: 1.15,\n dexterity_mult: 1.15,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.1\n });\n TheBlackHand.addToFactions([\"The Black Hand\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheBlackHand];\n }\n\n AddToAugmentations(TheBlackHand); // NiteSec\n\n const CRTX42AA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info: \"The CRTX42-AA gene is injected into the genome. \" + \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" + \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15\n });\n CRTX42AA.addToFactions([\"NiteSec\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CRTX42AA];\n }\n\n AddToAugmentations(CRTX42AA); // Chongqing\n\n const Neuregen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info: \"A drug that genetically modifies the neurons in the brain \" + \"resulting in neurons never die, continuously \" + \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4\n });\n Neuregen.addToFactions([\"Chongqing\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].Neuregen];\n }\n\n AddToAugmentations(Neuregen); // Sector12\n\n const CashRoot = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the chip allows you to connect it to a computer and upload the assets.\"),\n startingMoney: 1e6,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].BruteSSHProgram.name]\n });\n CashRoot.addToFactions([\"Sector-12\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].CashRoot];\n }\n\n AddToAugmentations(CashRoot); // NewTokyo\n\n const NutriGen = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info: \"A thermo-powered artificial nutrition generator. Endogenously \" + \"synthesizes glucose, amino acids, and vitamins and redistributes them \" + \"across the body. The device is powered by the body's naturally wasted \" + \"energy in the form of heat.\",\n strength_exp_mult: 1.2,\n defense_exp_mult: 1.2,\n dexterity_exp_mult: 1.2,\n agility_exp_mult: 1.2\n });\n NutriGen.addToFactions([\"New Tokyo\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NutriGen];\n }\n\n AddToAugmentations(NutriGen); // Aevum\n\n const PCMatrix = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info: \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" + \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" + \"outcomes of nearly every situation.\",\n charisma_mult: 1.0777,\n charisma_exp_mult: 1.0777,\n work_money_mult: 1.777,\n faction_rep_mult: 1.0777,\n company_rep_mult: 1.0777,\n crime_success_mult: 1.0777,\n crime_money_mult: 1.0777,\n programs: [_Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].DeepscanV1.name, _Programs_Programs__WEBPACK_IMPORTED_MODULE_9__[/* Programs */ \"a\"].AutoLink.name]\n });\n PCMatrix.addToFactions([\"Aevum\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].PCMatrix];\n }\n\n AddToAugmentations(PCMatrix); // Ishima\n\n const INFRARet = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet,\n repCost: 7.5e3,\n moneyCost: 3e7,\n info: \"A tiny chip that sits behind the retinae. This implant lets the\" + \"user visually detect infrared radiation.\",\n crime_success_mult: 1.25,\n crime_money_mult: 1.1,\n dexterity_mult: 1.1\n });\n INFRARet.addToFactions([\"Ishima\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INFRARet];\n }\n\n AddToAugmentations(INFRARet); // Volhaven\n\n const DermaForce = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info: \"Synthetic skin that is grafted onto the body. This skin consists of \" + \"millions of nanobots capable of projecting high-density muon beams, \" + \"creating an energy barrier around the user.\",\n defense_mult: 1.4\n });\n DermaForce.addToFactions([\"Volhaven\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].DermaForce];\n }\n\n AddToAugmentations(DermaForce); // SpeakersForTheDead\n\n const GrapheneBrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info: \"An upgrade to the BrachiBlades augmentation. It infuses \" + \"the retractable blades with an advanced graphene material \" + \"making them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3\n });\n GrapheneBrachiBlades.addToFactions([\"Speakers for the Dead\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBrachiBlades];\n }\n\n AddToAugmentations(GrapheneBrachiBlades); // DarkArmy\n\n const GrapheneBionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info: \"An upgrade to the Bionic Arms augmentation. It infuses the \" + \"prosthetic arms with an advanced graphene material \" + \"to make them stronger and lighter.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85\n });\n GrapheneBionicArms.addToFactions([\"The Dark Army\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GrapheneBionicArms];\n }\n\n AddToAugmentations(GrapheneBionicArms); // TheSyndicate\n\n const BrachiBlades = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades,\n repCost: 1.25e4,\n moneyCost: 9e7,\n info: \"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.\",\n strength_mult: 1.15,\n defense_mult: 1.15,\n crime_success_mult: 1.1,\n crime_money_mult: 1.15\n });\n BrachiBlades.addToFactions([\"The Syndicate\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BrachiBlades];\n }\n\n AddToAugmentations(BrachiBlades); // Tetrads\n\n const BionicArms = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms,\n repCost: 6.25e4,\n moneyCost: 2.75e8,\n info: \"Cybernetic arms created from plasteel and carbon fibers that completely replace \" + \"the user's organic arms.\",\n strength_mult: 1.3,\n dexterity_mult: 1.3\n });\n BionicArms.addToFactions([\"Tetrads\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BionicArms];\n }\n\n AddToAugmentations(BionicArms); // TianDiHui\n\n const SNA = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info: \"A cranial implant that affects the user's personality, making them better \" + \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15\n });\n SNA.addToFactions([\"Tian Di Hui\"]);\n\n if (augmentationExists(_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].SNA];\n }\n\n AddToAugmentations(SNA); // Special Bladeburner Augmentations\n\n const BladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_6__[/* factionExists */ \"b\"])(BladeburnersFactionName)) {\n const EsperEyewear = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info: \"Ballistic-grade protective and retractable eyewear that was designed specifically \" + \"for Bladeburner units. This \" + \"is implanted by installing a mechanical frame in the skull's orbit. \" + \"This frame interfaces with the brain and allows the user to \" + \"automatically extrude and extract the eyewear. The eyewear protects \" + \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" + \"embedded with a data processing chip that can be programmed to display an \" + \"AR HUD to assist the user in field missions.\",\n bladeburner_success_chance_mult: 1.03,\n dexterity_mult: 1.05,\n isSpecial: true\n });\n EsperEyewear.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EsperEyewear);\n const EMS4Recombination = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info: \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" + \"technique was originally used on Bladeburners during the Synthoid uprising \" + \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" + \"improve reflexes, and improve memory among other things.\",\n bladeburner_success_chance_mult: 1.03,\n bladeburner_analysis_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n isSpecial: true\n });\n EMS4Recombination.addToFactions([BladeburnersFactionName]);\n resetAugmentation(EMS4Recombination);\n const OrionShoulder = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info: \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" + \"the ORION-MKIV shoulder enhances the strength and dexterity \" + \"of the user's right arm. It also provides protection due to its \" + \"crystallized graphene plating.\",\n defense_mult: 1.05,\n strength_mult: 1.05,\n dexterity_mult: 1.05,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n OrionShoulder.addToFactions([BladeburnersFactionName]);\n resetAugmentation(OrionShoulder);\n const HyperionV1 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info: \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" + \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" + \"be used against augmented enemies as the ionized \" + \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" + \"it can also be effective against non-augmented enemies due to its high temperature \" + \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n HyperionV1.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV1);\n const HyperionV2 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"A pair of mini plasma cannons embedded into the hands. This augmentation \" + \"is more advanced and powerful than the original V1 model. This V2 model is \" + \"more power-efficient, more accurate, and can fire plasma bolts at a much \" + \"higher velocity than the V1 model.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n HyperionV2.addToFactions([BladeburnersFactionName]);\n resetAugmentation(HyperionV2);\n const GolemSerum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info: \"A serum that permanently enhances many aspects of human capabilities, \" + \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" + \"serum was originally developed by the Chinese military in an attempt to \" + \"create super soldiers.\",\n strength_mult: 1.07,\n defense_mult: 1.07,\n dexterity_mult: 1.07,\n agility_mult: 1.07,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n GolemSerum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(GolemSerum);\n const VangelisVirus = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" + \"heightens the senses and focus of its host, and also enhances its intuition.\",\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.1,\n bladeburner_success_chance_mult: 1.04,\n isSpecial: true\n });\n VangelisVirus.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus);\n const VangelisVirus3 = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info: \"An improved version of Vangelis, a synthetic symbiotic virus that is \" + \"injected into human brain tissue. On top of the benefits of the original \" + \"virus, this also grants an accelerated healing factor and enhanced \" + \"reflexes.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].VangelisVirus],\n defense_exp_mult: 1.1,\n dexterity_exp_mult: 1.1,\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.05,\n isSpecial: true\n });\n VangelisVirus3.addToFactions([BladeburnersFactionName]);\n resetAugmentation(VangelisVirus3);\n const INTERLINKED = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info: \"The DNA is genetically modified to enhance the human's body \" + \"extracellular matrix (ECM). This improves the ECM's ability to \" + \"structurally support the body and grants heightened strength and \" + \"durability.\",\n strength_exp_mult: 1.05,\n defense_exp_mult: 1.05,\n dexterity_exp_mult: 1.05,\n agility_exp_mult: 1.05,\n bladeburner_max_stamina_mult: 1.1,\n isSpecial: true\n });\n INTERLINKED.addToFactions([BladeburnersFactionName]);\n resetAugmentation(INTERLINKED);\n const BladeRunner = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info: \"A cybernetic foot augmentation that was specifically created for Bladeburners \" + \"during the Synthoid Uprising. The organic musculature of the human foot \" + \"is enhanced with flexible carbon nanotube matrices that are controlled by \" + \"intelligent servo-motors.\",\n agility_mult: 1.05,\n bladeburner_max_stamina_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.05,\n isSpecial: true\n });\n BladeRunner.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeRunner);\n const BladeArmor = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info: \"A powered exoskeleton suit designed as armor for Bladeburner units. This \" + \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" + \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" + \"physical abilities.\",\n strength_mult: 1.04,\n defense_mult: 1.04,\n dexterity_mult: 1.04,\n agility_mult: 1.04,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_success_chance_mult: 1.03,\n isSpecial: true\n });\n BladeArmor.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmor);\n const BladeArmorPowerCells = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" + \"more efficiently storing and using power.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.05,\n bladeburner_stamina_gain_mult: 1.02,\n bladeburner_max_stamina_mult: 1.05,\n isSpecial: true\n });\n BladeArmorPowerCells.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorPowerCells);\n const BladeArmorEnergyShielding = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" + \"that is capable of projecting an energy shielding force field.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true\n });\n BladeArmorEnergyShielding.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorEnergyShielding);\n const BladeArmorUnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info: \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" + \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" + \"threats while keeping casualties to a minimum.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true\n });\n BladeArmorUnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorUnibeam);\n const BladeArmorOmnibeam = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info: \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" + \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" + \"modules that combine together to form a single, more powerful beam of up to \" + \"2000MW.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true\n });\n BladeArmorOmnibeam.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorOmnibeam);\n const BladeArmorIPU = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info: \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" + \"Unit that was specially designed to analyze Synthoid related data and \" + \"information.\",\n prereqs: [_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true\n });\n BladeArmorIPU.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladeArmorIPU);\n const BladesSimulacrum = new _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"]({\n name: _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info: \"A highly-advanced matter phase-shifter module that is embedded \" + \"in the brainstem and cerebellum. This augmentation allows \" + \"the user to project and control a holographic simulacrum within an \" + \"extremely large radius. These specially-modified holograms were specifically \" + \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: react__WEBPACK_IMPORTED_MODULE_14___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_14___default.a.Fragment, null, \"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time.\"),\n isSpecial: true\n });\n BladesSimulacrum.addToFactions([BladeburnersFactionName]);\n resetAugmentation(BladesSimulacrum);\n } // Update costs based on how many have been purchased\n\n\n mult = Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_10__[/* SourceFileFlags */ \"a\"][11]], _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length);\n\n for (var name in _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n if (_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name].baseCost *= mult;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].reapplyAllAugmentations();\n} //Resets an Augmentation during (re-initizliation)\n\n\nfunction resetAugmentation(newAugObject) {\n if (!(newAugObject instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"])) {\n throw new Error(\"Invalid argument 'newAugObject' passed into resetAugmentation\");\n }\n\n var name = newAugObject.name;\n\n if (augmentationExists(name)) {\n delete _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][name];\n }\n\n AddToAugmentations(newAugObject);\n}\n\nfunction applyAugmentation(aug, reapply = false) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].owned = true;\n const augObj = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name]; // Apply multipliers\n\n for (const mult in augObj.mults) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"][mult] *= augObj.mults[mult];\n }\n } // Special logic for NeuroFlux Governor\n\n\n if (aug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n if (!reapply) {\n _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug.name].level = aug.level;\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].name == _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations[i].level = aug.level;\n return; // break;\n }\n }\n }\n } // Push onto Player's Augmentation list\n\n\n if (!reapply) {\n var ownedAug = new _PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](aug.name);\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations() {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length == 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n\n let augmentationList = \"\";\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i].name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i];\n const aug = _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations[i]);\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n let level = \"\";\n\n if (ownedAug.name === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n\n augmentationList += aug.name + level + \"
\";\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_7__[/* Player */ \"a\"].queuedAugmentations = [];\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"You slowly drift to sleep as scientists put you under in order \" + \"to install the following Augmentations:
\" + augmentationList + \"
You wake up in your home...you feel different...\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_8__[/* prestigeAugmentation */ \"a\"])();\n}\n\nfunction augmentationExists(name) {\n return _Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"].hasOwnProperty(name);\n}\n\nfunction isRepeatableAug(aug) {\n const augName = aug instanceof _Augmentation__WEBPACK_IMPORTED_MODULE_0__[/* Augmentation */ \"a\"] ? aug.name : aug;\n\n if (augName === _data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return true;\n }\n\n return false;\n}\n\n\n//# sourceURL=webpack:///./src/Augmentation/AugmentationHelpers.jsx?"); /***/ }), -/* 118 */ +/* 119 */ /*!**************************!*\ !*** ./src/Missions.jsx ***! \**************************/ @@ -1095,10 +1096,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setInMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return currMission; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! jsplumb */ 1114);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n // For some reason `jsplumb` needs to be imported exactly like this,\n// lowercase p, and later in the code used as `jsPlumb` uppercase P. wtf.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n\n\nlet inMission = false; // Flag to denote whether a mission is running\n\nlet currMission = null;\n\nfunction setInMission(bool, mission) {\n inMission = bool;\n\n if (bool) {\n currMission = mission;\n } else {\n currMission = null;\n }\n} // Keyboard shortcuts\n\n\n$(document).keydown(function (e) {\n if (inMission && currMission && currMission.selectedNode.length != 0) {\n switch (e.keyCode) {\n case 65:\n // a for Attack\n currMission.actionButtons[0].click();\n break;\n\n case 83:\n // s for Scan\n currMission.actionButtons[1].click();\n break;\n\n case 87:\n // w for Weaken\n currMission.actionButtons[2].click();\n break;\n\n case 70:\n // f for Fortify\n currMission.actionButtons[3].click();\n break;\n\n case 82:\n // r for Overflow\n currMission.actionButtons[4].click();\n break;\n\n case 68:\n // d for Detach connection\n currMission.actionButtons[5].click();\n break;\n\n default:\n break;\n }\n }\n});\nlet NodeTypes = {\n Core: \"CPU Core Node\",\n // All actions available\n Firewall: \"Firewall Node\",\n // No actions available\n Database: \"Database Node\",\n // No actions available\n Spam: \"Spam Node\",\n // No actions Available\n Transfer: \"Transfer Node\",\n // Can Weaken, Scan, Fortify and Overflow\n Shield: \"Shield Node\" // Can Fortify\n\n};\nlet NodeActions = {\n Attack: \"Attacking\",\n // Damaged based on attack stat + hacking level + opp def\n Scan: \"Scanning\",\n // -Def for target, affected by attack and hacking level\n Weaken: \"Weakening\",\n // -Attack for target, affected by attack and hacking level\n Fortify: \"Fortifying\",\n // +Defense for Node, affected by hacking level\n Overflow: \"Overflowing\" // +Attack but -Defense for Node, affected by hacking level\n\n};\n\nfunction Node(type, stats) {\n this.type = type;\n this.atk = stats.atk ? stats.atk : 0;\n this.def = stats.def ? stats.def : 0;\n this.hp = stats.hp ? stats.hp : 0;\n this.maxhp = this.hp;\n this.plyrCtrl = false;\n this.enmyCtrl = false;\n this.pos = [0, 0]; // x, y\n\n this.el = null; // Holds the Node's DOM element\n\n this.action = null;\n this.targetedCount = 0; // Count of how many connections this node is the target of\n\n /**\n * Holds the JsPlumb Connection object for this Node, where this Node is the Source (since each Node\n * can only have 1 outgoing Connection)\n */\n\n this.conn = null;\n}\n\nNode.prototype.setPosition = function (x, y) {\n this.pos = [x, y];\n};\n\nNode.prototype.setControlledByPlayer = function () {\n this.plyrCtrl = true;\n this.enmyCtrl = false;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-enemy-node\");\n this.el.classList.add(\"hack-mission-player-node\");\n }\n};\n\nNode.prototype.setControlledByEnemy = function () {\n this.plyrCtrl = false;\n this.enmyCtrl = true;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-player-node\");\n this.el.classList.add(\"hack-mission-enemy-node\");\n }\n}; // Sets this node to be the active node\n\n\nNode.prototype.select = function (actionButtons) {\n if (this.enmyCtrl) {\n return;\n }\n\n this.el.classList.add(\"hack-mission-player-node-active\"); // Make all buttons inactive\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n\n switch (this.type) {\n case NodeTypes.Core:\n // All buttons active\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button-inactive\");\n actionButtons[i].classList.add(\"a-link-button\");\n }\n\n break;\n\n case NodeTypes.Transfer:\n actionButtons[1].classList.remove(\"a-link-button-inactive\");\n actionButtons[1].classList.add(\"a-link-button\");\n actionButtons[2].classList.remove(\"a-link-button-inactive\");\n actionButtons[2].classList.add(\"a-link-button\");\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n actionButtons[4].classList.remove(\"a-link-button-inactive\");\n actionButtons[4].classList.add(\"a-link-button\");\n actionButtons[5].classList.remove(\"a-link-button-inactive\");\n actionButtons[5].classList.add(\"a-link-button\");\n break;\n\n case NodeTypes.Shield:\n case NodeTypes.Firewall:\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n break;\n\n default:\n break;\n }\n};\n\nNode.prototype.deselect = function (actionButtons) {\n this.el.classList.remove(\"hack-mission-player-node-active\");\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nNode.prototype.untarget = function () {\n if (this.targetedCount === 0) {\n console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`);\n return;\n }\n\n --this.targetedCount;\n};\n/**\n * Hacking mission instance\n * @param rep {number} How much reputation the player has for the faction\n * @param fac {Faction} Faction for which this mission is being conducted\n */\n\n\nfunction HackingMission(rep, fac) {\n this.faction = fac;\n this.started = false;\n this.time = 180000; // 5 minutes to start, milliseconds\n\n this.playerCores = [];\n this.playerNodes = []; // Non-core nodes\n\n this.playerAtk = 0;\n this.playerDef = 0;\n this.enemyCores = [];\n this.enemyDatabases = [];\n this.enemyNodes = []; // Non-core nodes\n\n this.enemyAtk = 0;\n this.enemyDef = 0;\n this.miscNodes = [];\n this.selectedNode = []; // Which of the player's nodes are currently selected\n\n this.actionButtons = []; // DOM buttons for actions\n\n this.availablePositions = [];\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.availablePositions.push([r, c]);\n }\n }\n\n this.map = [];\n\n for (var i = 0; i < 8; ++i) {\n this.map.push([null, null, null, null, null, null, null, null]);\n }\n\n this.jsplumbinstance = null;\n this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToDiffConversion + 1;\n this.reward = 250 + rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToRewardConversion;\n}\n\nHackingMission.prototype.init = function () {\n // Create Header DOM\n this.createPageDom(); // Create player starting nodes\n\n var home = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < home.cpuCores; ++i) {\n var stats = {\n atk: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 7.5 + 30,\n def: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 20,\n hp: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 4\n };\n this.playerCores.push(new Node(NodeTypes.Core, stats));\n this.playerCores[i].setControlledByPlayer();\n this.setNodePosition(this.playerCores[i], i, 0);\n this.removeAvailablePosition(i, 0);\n } // Randomly generate enemy nodes (CPU and Firewall) based on difficulty\n\n\n var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));\n var numFirewalls = Math.min(20, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(Math.round(this.difficulty / 3), Math.round(this.difficulty / 3) + 1));\n var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(1, Math.round(this.difficulty / 3) + 1));\n var totalNodes = numNodes + numFirewalls + numDatabases;\n var xlimit = 7 - Math.floor(totalNodes / 8);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.8 + this.difficulty / 5, 10);\n\n for (var i = 0; i < numNodes; ++i) {\n var stats = {\n atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(80, 86),\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(5, 10),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 230)\n };\n this.enemyCores.push(new Node(NodeTypes.Core, stats));\n this.enemyCores[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyCores[i], xlimit);\n }\n\n for (var i = 0; i < numFirewalls; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(10, 20),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(275, 300)\n };\n this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));\n this.enemyNodes[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyNodes[i], xlimit);\n }\n\n for (var i = 0; i < numDatabases; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 55),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 275)\n };\n var node = new Node(NodeTypes.Database, stats);\n node.setControlledByEnemy();\n this.setNodeRandomPosition(node, xlimit);\n this.enemyDatabases.push(node);\n }\n\n this.calculateDefenses();\n this.calculateAttacks();\n this.createMap();\n};\n\nHackingMission.prototype.createPageDom = function () {\n var container = document.getElementById(\"mission-container\");\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n var headerText = document.createElement(\"p\");\n react_dom__WEBPACK_IMPORTED_MODULE_11___default.a.render(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"You are about to start a hacking mission! You will gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" faction reputation with\", \" \", this.faction.name, \" if you win. Click the 'Start' button to begin.\"), headerText);\n headerText.style.display = \"block\";\n headerText.classList.add(\"hack-mission-header-element\");\n headerText.style.width = \"80%\";\n var inGameGuideBtn = document.createElement(\"a\");\n inGameGuideBtn.innerText = \"How to Play\";\n inGameGuideBtn.classList.add(\"a-link-button\");\n inGameGuideBtn.style.display = \"inline-block\";\n inGameGuideBtn.classList.add(\"hack-mission-header-element\");\n inGameGuideBtn.addEventListener(\"click\", function () {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionHowToPlay);\n return false;\n }); // Start button will get replaced with forfeit when game is started\n\n var startBtn = document.createElement(\"a\");\n startBtn.innerHTML = \"Start\";\n startBtn.setAttribute(\"id\", \"hack-mission-start-btn\");\n startBtn.classList.add(\"a-link-button\");\n startBtn.classList.add(\"hack-mission-header-element\");\n startBtn.style.display = \"inline-block\";\n startBtn.addEventListener(\"click\", () => {\n this.start();\n return false;\n });\n var forfeitMission = document.createElement(\"a\");\n forfeitMission.innerHTML = \"Forfeit Mission (Exit)\";\n forfeitMission.classList.add(\"a-link-button\");\n forfeitMission.classList.add(\"hack-mission-header-element\");\n forfeitMission.style.display = \"inline-block\";\n forfeitMission.addEventListener(\"click\", () => {\n this.finishMission(false);\n return false;\n });\n var timer = document.createElement(\"p\");\n timer.setAttribute(\"id\", \"hacking-mission-timer\");\n timer.style.display = \"inline-block\";\n timer.style.margin = \"6px\"; // Create Action Buttons (Attack/Scan/Weaken/ etc...)\n\n var actionsContainer = document.createElement(\"span\");\n actionsContainer.style.display = \"block\";\n actionsContainer.classList.add(\"hack-mission-action-buttons-container\");\n\n for (var i = 0; i < 6; ++i) {\n this.actionButtons.push(document.createElement(\"a\"));\n this.actionButtons[i].style.display = \"inline-block\";\n this.actionButtons[i].classList.add(\"a-link-button-inactive\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"tooltip\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"hack-mission-header-element\");\n actionsContainer.appendChild(this.actionButtons[i]);\n }\n\n this.actionButtons[0].innerText = \"Attack(a)\";\n var atkTooltip = document.createElement(\"span\");\n atkTooltip.classList.add(\"tooltiptexthigh\");\n atkTooltip.innerText = \"Lowers the targeted node's HP. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[0].appendChild(atkTooltip);\n this.actionButtons[1].innerText = \"Scan(s)\";\n var scanTooltip = document.createElement(\"span\");\n scanTooltip.classList.add(\"tooltiptexthigh\");\n scanTooltip.innerText = \"Lowers the targeted node's defense. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[1].appendChild(scanTooltip);\n this.actionButtons[2].innerText = \"Weaken(w)\";\n var WeakenTooltip = document.createElement(\"span\");\n WeakenTooltip.classList.add(\"tooltiptexthigh\");\n WeakenTooltip.innerText = \"Lowers the targeted node's attack. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[2].appendChild(WeakenTooltip);\n this.actionButtons[3].innerText = \"Fortify(f)\";\n var fortifyTooltip = document.createElement(\"span\");\n fortifyTooltip.classList.add(\"tooltiptexthigh\");\n fortifyTooltip.innerText = \"Raises this node's Defense level. The effectiveness of this depends on \" + \"your hacking level\";\n this.actionButtons[3].appendChild(fortifyTooltip);\n this.actionButtons[4].innerText = \"Overflow(r)\";\n var overflowTooltip = document.createElement(\"span\");\n overflowTooltip.classList.add(\"tooltiptexthigh\");\n overflowTooltip.innerText = \"Raises this node's Attack level but lowers its Defense level. The effectiveness \" + \"of this depends on your hacking level.\";\n this.actionButtons[4].appendChild(overflowTooltip);\n this.actionButtons[5].innerText = \"Drop Connection(d)\";\n var dropconnTooltip = document.createElement(\"span\");\n dropconnTooltip.classList.add(\"tooltiptexthigh\");\n dropconnTooltip.innerText = \"Removes this Node's current connection to some target Node, if it has one. This can \" + \"also be done by simply clicking the white connection line.\";\n this.actionButtons[5].appendChild(dropconnTooltip); // Player/enemy defense displays will be in action container\n\n var playerStats = document.createElement(\"p\");\n var enemyStats = document.createElement(\"p\");\n playerStats.style.display = \"inline-block\";\n enemyStats.style.display = \"inline-block\";\n playerStats.style.color = \"#00ccff\";\n enemyStats.style.color = \"red\";\n playerStats.style.margin = \"4px\";\n enemyStats.style.margin = \"4px\";\n playerStats.setAttribute(\"id\", \"hacking-mission-player-stats\");\n enemyStats.setAttribute(\"id\", \"hacking-mission-enemy-stats\");\n actionsContainer.appendChild(playerStats);\n actionsContainer.appendChild(enemyStats); // Set Action Button event listeners\n\n this.actionButtons[0].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n if (this.selectedNode[0].type !== NodeTypes.Core) {\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Attack, false); // Set attack button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Attack;\n });\n });\n this.actionButtons[1].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Scan, false); // Set scan button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Scan;\n });\n });\n this.actionButtons[2].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Weaken, false); // Set Weaken button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Weaken;\n });\n });\n this.actionButtons[3].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Fortify, false); // Set Fortify button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Fortify;\n });\n });\n this.actionButtons[4].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type;\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Overflow, false); // Set Overflow button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Overflow;\n });\n });\n this.actionButtons[5].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.selectedNode.forEach(function (node) {\n if (node.conn) {\n var endpoints = node.conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }\n\n node.action = NodeActions.Fortify;\n });\n });\n var timeDisplay = document.createElement(\"p\");\n container.appendChild(headerText);\n container.appendChild(inGameGuideBtn);\n container.appendChild(startBtn);\n container.appendChild(forfeitMission);\n container.appendChild(timer);\n container.appendChild(actionsContainer);\n container.appendChild(timeDisplay);\n};\n\nHackingMission.prototype.setActionButtonsInactive = function () {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.setActionButtonsActive = function (nodeType = null) {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.add(\"a-link-button\");\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n }\n /**\n * For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled\n * 0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn\n */\n\n\n if (nodeType) {\n switch (nodeType) {\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n this.actionButtons[1].classList.remove(\"a-link-button\");\n this.actionButtons[1].classList.add(\"a-link-button-inactive\");\n this.actionButtons[2].classList.remove(\"a-link-button\");\n this.actionButtons[2].classList.add(\"a-link-button-inactive\");\n this.actionButtons[4].classList.remove(\"a-link-button\");\n this.actionButtons[4].classList.add(\"a-link-button-inactive\");\n this.actionButtons[5].classList.remove(\"a-link-button\");\n this.actionButtons[5].classList.add(\"a-link-button-inactive\");\n break;\n\n case NodeTypes.Transfer:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n break;\n\n default:\n break;\n }\n }\n}; // True for active, false for inactive\n\n\nHackingMission.prototype.setActionButton = function (i, active = true) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(i)) {\n switch (i) {\n case NodeActions.Attack:\n i = 0;\n break;\n\n case NodeActions.Scan:\n i = 1;\n break;\n\n case NodeActions.Weaken:\n i = 2;\n break;\n\n case NodeActions.Fortify:\n i = 3;\n break;\n\n case NodeActions.Overflow:\n default:\n i = 4;\n break;\n }\n }\n\n if (active) {\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n this.actionButtons[i].classList.add(\"a-link-button\");\n } else {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.calculateAttacks = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].atk;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].atk;\n }\n\n this.playerAtk = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].atk;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].atk;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].atk;\n }\n\n this.enemyAtk = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.calculateDefenses = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].def;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].def;\n }\n\n this.playerDef = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].def;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].def;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].def;\n }\n\n this.enemyDef = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.removeAvailablePosition = function (x, y) {\n for (var i = 0; i < this.availablePositions.length; ++i) {\n if (this.availablePositions[i][0] === x && this.availablePositions[i][1] === y) {\n this.availablePositions.splice(i, 1);\n return;\n }\n }\n\n console.warn(`removeAvailablePosition() did not remove ${x}, ${y}`);\n};\n\nHackingMission.prototype.setNodePosition = function (nodeObj, x, y) {\n if (!(nodeObj instanceof Node)) {\n console.warn(\"Non-Node object passed into setNodePOsition\");\n return;\n }\n\n if (isNaN(x) || isNaN(y)) {\n console.error(`Invalid values (${x}, ${y}) passed as (x, y) for setNodePosition`);\n return;\n }\n\n nodeObj.pos = [x, y];\n this.map[x][y] = nodeObj;\n};\n\nHackingMission.prototype.setNodeRandomPosition = function (nodeObj, xlimit = 0) {\n var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.availablePositions.length - 1);\n\n if (this.availablePositions[i][1] < xlimit) {\n // Recurse if not within limit\n return this.setNodeRandomPosition(nodeObj, xlimit);\n }\n\n var pos = this.availablePositions.splice(i, 1);\n pos = pos[0];\n this.setNodePosition(nodeObj, pos[0], pos[1]);\n};\n\nHackingMission.prototype.createMap = function () {\n // Use a grid\n var map = document.createElement(\"div\");\n map.classList.add(\"hack-mission-grid\");\n map.setAttribute(\"id\", \"hacking-mission-map\");\n document.getElementById(\"mission-container\").appendChild(map); // Create random Nodes for every space in the map that\n // hasn't been filled yet. The stats of each Node will be based on\n // the player/enemy attack\n\n var averageAttack = (this.playerAtk + this.enemyAtk) / 2;\n\n for (var x = 0; x < 8; ++x) {\n for (var y = 0; y < 8; ++y) {\n if (!(this.map[x][y] instanceof Node)) {\n var node,\n type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, 2);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.85 + this.difficulty / 2, 15);\n\n switch (type) {\n case 0:\n // Spam\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(200, 225)\n };\n node = new Node(NodeTypes.Spam, stats);\n break;\n\n case 1:\n // Transfer\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(250, 275)\n };\n node = new Node(NodeTypes.Transfer, stats);\n break;\n\n case 2: // Shield\n\n default:\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 70),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(300, 320)\n };\n node = new Node(NodeTypes.Shield, stats);\n break;\n }\n\n this.setNodePosition(node, x, y);\n this.removeAvailablePosition(x, y);\n this.miscNodes.push(node);\n }\n }\n } // Create DOM elements in order\n\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.createNodeDomElement(this.map[r][c]);\n }\n } // Configure all Player CPUS\n\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n this.configurePlayerNodeElement(this.playerCores[i].el);\n }\n};\n\nHackingMission.prototype.createNodeDomElement = function (nodeObj) {\n var nodeDiv = document.createElement(\"a\"),\n txtEl = document.createElement(\"p\");\n nodeObj.el = nodeDiv; // Set the node element's id based on its coordinates\n\n var id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n nodeDiv.setAttribute(\"id\", id);\n txtEl.setAttribute(\"id\", id + \"-txt\"); // Set node classes for owner\n\n nodeDiv.classList.add(\"hack-mission-node\");\n\n if (nodeObj.plyrCtrl) {\n nodeDiv.classList.add(\"hack-mission-player-node\");\n } else if (nodeObj.enmyCtrl) {\n nodeDiv.classList.add(\"hack-mission-enemy-node\");\n } // Set node classes based on type\n\n\n var txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-cpu-node\");\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-firewall-node\");\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-database-node\");\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-spam-node\");\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-transfer-node\");\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-shield-node\");\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n txtEl.innerHTML = txt;\n nodeDiv.appendChild(txtEl);\n document.getElementById(\"hacking-mission-map\").appendChild(nodeDiv);\n};\n\nHackingMission.prototype.updateNodeDomElement = function (nodeObj) {\n if (nodeObj.el == null) {\n console.error(\"Calling updateNodeDomElement on a Node without an element\");\n return;\n }\n\n let id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n let txtEl = document.getElementById(id + \"-txt\"); // Set node classes based on type\n\n let txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n\n if (nodeObj.action) {\n txt += \"
\" + nodeObj.action;\n }\n\n txtEl.innerHTML = txt;\n};\n/**\n * Gets a Node DOM elements corresponding Node object using its\n * element id. Function accepts either the DOM element object or the ID as\n * an argument\n */\n\n\nHackingMission.prototype.getNodeFromElement = function (el) {\n var id;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(el)) {\n id = el;\n } else {\n id = el.id;\n }\n\n id = id.replace(\"hacking-mission-node-\", \"\");\n var res = id.split(\"-\");\n\n if (res.length != 2) {\n console.error(\"Parsing hacking mission node id. could not find coordinates\");\n return null;\n }\n\n var x = res[0],\n y = res[1];\n\n if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) {\n console.error(`Unexpected values (${x}, ${y}) for (x, y)`);\n return null;\n }\n\n return this.map[x][y];\n};\n\nfunction selectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n nodeObj.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(nodeObj);\n}\n\nfunction multiselectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node Object in multiselectNode()\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n var type = nodeObj.type;\n\n if (type === NodeTypes.Core) {\n hackMissionInst.playerCores.forEach(function (node) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n });\n } else {\n hackMissionInst.playerNodes.forEach(function (node) {\n if (node.type === type) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n }\n });\n }\n}\n\nfunction clearAllSelectedNodes(hackMissionInst) {\n if (hackMissionInst.selectedNode.length > 0) {\n hackMissionInst.selectedNode.forEach(function (node) {\n node.deselect(hackMissionInst.actionButtons);\n });\n hackMissionInst.selectedNode.length = 0;\n }\n}\n/**\n * Configures a DOM element representing a player-owned node to\n * be selectable and actionable.\n * Note: Does NOT change its css class. This is handled by Node.setControlledBy...\n */\n\n\nHackingMission.prototype.configurePlayerNodeElement = function (el) {\n var nodeObj = this.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n } // Add event listener\n\n\n const selectNodeWrapper = () => {\n selectNode(this, el);\n };\n\n el.addEventListener(\"click\", selectNodeWrapper);\n\n const multiselectNodeWrapper = () => {\n multiselectNode(this, el);\n };\n\n el.addEventListener(\"dblclick\", multiselectNodeWrapper);\n\n if (el.firstChild) {\n el.firstChild.addEventListener(\"click\", selectNodeWrapper);\n }\n};\n/**\n * Configures a DOM element representing an enemy-node by removing\n * any event listeners\n */\n\n\nHackingMission.prototype.configureEnemyNodeElement = function (el) {\n // Deselect node if it was the selected node\n var nodeObj = this.getNodeFromElement(el);\n\n for (var i = 0; i < this.selectedNode.length; ++i) {\n if (this.selectedNode[i] == nodeObj) {\n nodeObj.deselect(this.actionButtons);\n this.selectedNode.splice(i, 1);\n break;\n }\n }\n};\n/**\n * Returns bool indicating whether a node is reachable by player\n * by checking if any of the adjacent nodes are owned by the player\n */\n\n\nHackingMission.prototype.nodeReachable = function (node) {\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].plyrCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].plyrCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].plyrCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].plyrCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.nodeReachableByEnemy = function (node) {\n if (node == null) {\n return false;\n }\n\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].enmyCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].enmyCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].enmyCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].enmyCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.start = function () {\n this.started = true;\n this.initJsPlumb();\n var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__[/* clearEventListeners */ \"a\"])(\"hack-mission-start-btn\");\n startBtn.classList.remove(\"a-link-button\");\n startBtn.classList.add(\"a-link-button-inactive\");\n};\n\nHackingMission.prototype.initJsPlumb = function () {\n var instance = jsPlumb.getInstance({\n DragOptions: {\n cursor: \"pointer\",\n zIndex: 2000\n },\n PaintStyle: {\n gradient: {\n stops: [[0, \"#FFFFFF\"], [1, \"#FFFFFF\"]]\n },\n stroke: \"#FFFFFF\",\n strokeWidth: 8\n }\n });\n this.jsplumbinstance = instance; // All player cores are sources\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n instance.makeSource(this.playerCores[i].el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Everything else is a target\n\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n instance.makeTarget(this.enemyCores[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n instance.makeTarget(this.enemyDatabases[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n instance.makeTarget(this.enemyNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.miscNodes.length; ++i) {\n instance.makeTarget(this.miscNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Clicking a connection drops it\n\n\n instance.bind(\"click\", conn => {\n // Cannot drop enemy's connections\n const sourceNode = this.getNodeFromElement(conn.source);\n\n if (sourceNode.enmyCtrl) {\n return;\n }\n\n var endpoints = conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }); // Connection events\n\n instance.bind(\"connection\", info => {\n var targetNode = this.getNodeFromElement(info.target); // Do not detach for enemy nodes\n\n var thisNode = this.getNodeFromElement(info.source);\n\n if (thisNode.enmyCtrl) {\n return;\n } // If the node is not reachable, drop the connection\n\n\n if (!this.nodeReachable(targetNode)) {\n info.sourceEndpoint.detachFrom(info.targetEndpoint);\n return;\n }\n\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = info.connection;\n var targetNode = this.getNodeFromElement(info.target);\n ++targetNode.targetedCount;\n }); // Detach Connection events\n\n instance.bind(\"connectionDetached\", info => {\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = null;\n var targetNode = this.getNodeFromElement(info.target);\n targetNode.untarget();\n });\n}; // Drops all connections where the specified node is the source\n\n\nHackingMission.prototype.dropAllConnectionsFromNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].source == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n}; // Drops all connections where the specified node is the target\n\n\nHackingMission.prototype.dropAllConnectionsToNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].target == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n\n node.beingTargeted = false;\n};\n\nvar storedCycles = 0;\n\nHackingMission.prototype.process = function (numCycles = 1) {\n if (!this.started) {\n return;\n }\n\n storedCycles += numCycles;\n\n if (storedCycles < 2) {\n return;\n } // Only process every 3 cycles minimum\n\n\n var res = false; // Process actions of all player nodes\n\n this.playerCores.forEach(node => {\n res |= this.processNode(node, storedCycles);\n });\n this.playerNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n res |= this.processNode(node, storedCycles);\n }\n }); // Process actions of all enemy nodes\n\n this.enemyCores.forEach(node => {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n });\n this.enemyNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n }\n }); // The hp of enemy databases increases slowly\n\n this.enemyDatabases.forEach(node => {\n node.maxhp += 0.1 * storedCycles;\n node.hp += 0.1 * storedCycles;\n });\n\n if (res) {\n this.calculateAttacks();\n this.calculateDefenses();\n } // Win if all enemy databases are conquered\n\n\n if (this.enemyDatabases.length === 0) {\n this.finishMission(true);\n return;\n } // Lose if all your cores are gone\n\n\n if (this.playerCores.length === 0) {\n this.finishMission(false);\n return;\n } // Defense/hp of misc nodes increases slowly over time\n\n\n this.miscNodes.forEach(node => {\n node.def += 0.1 * storedCycles;\n node.maxhp += 0.05 * storedCycles;\n node.hp += 0.1 * storedCycles;\n\n if (node.hp > node.maxhp) {\n node.hp = node.maxhp;\n }\n\n this.updateNodeDomElement(node);\n }); // Update timer and check if player lost\n\n this.time -= storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (this.time <= 0) {\n this.finishMission(false);\n return;\n }\n\n this.updateTimer();\n storedCycles = 0;\n}; // Returns a bool representing whether defenses need to be re-calculated\n\n\nHackingMission.prototype.processNode = function (nodeObj, numCycles = 1) {\n if (nodeObj.action == null) {\n return;\n }\n\n var targetNode = null,\n def,\n atk;\n\n if (nodeObj.conn) {\n if (nodeObj.conn.target != null) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {// Player is in the middle of dragging the connection,\n // so the target node is null. Do nothing here\n } else if (targetNode.plyrCtrl) {\n def = this.playerDef;\n atk = this.enemyAtk;\n } else if (targetNode.enmyCtrl) {\n def = this.enemyDef;\n atk = this.playerAtk;\n } else {\n // Misc Node\n def = targetNode.def;\n nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk;\n }\n } // Calculations are per second, so divide everything by 5\n\n\n var calcStats = false,\n plyr = nodeObj.plyrCtrl;\n var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionDifficultyToHacking;\n\n switch (nodeObj.action) {\n case NodeActions.Attack:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.hp -= dmg / 5 * numCycles;\n break;\n\n case NodeActions.Scan:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.def -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Weaken:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.atk -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Fortify:\n var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n nodeObj.def += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Overflow:\n var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n\n if (nodeObj.def < eff) {\n break;\n }\n\n nodeObj.def -= eff / 5 * numCycles;\n nodeObj.atk += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n default:\n console.error(`Invalid Node Action: ${nodeObj.action}`);\n break;\n } // Stats can't go below 0\n\n\n if (nodeObj.atk < 0) {\n nodeObj.atk = 0;\n }\n\n if (nodeObj.def < 0) {\n nodeObj.def = 0;\n }\n\n if (targetNode && targetNode.atk < 0) {\n targetNode.atk = 0;\n }\n\n if (targetNode && targetNode.def < 0) {\n targetNode.def = 0;\n } // Conquering a node\n\n\n if (targetNode && targetNode.hp <= 0) {\n var conqueredByPlayer = nodeObj.plyrCtrl;\n targetNode.hp = targetNode.maxhp;\n targetNode.action = null;\n targetNode.conn = null;\n\n if (this.selectedNode == targetNode) {\n targetNode.deselect(this.actionButtons);\n } // The conquered node has its stats reduced\n\n\n targetNode.atk /= 2;\n targetNode.def /= 3.5; // Flag for whether the target node was a misc node\n\n var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; // Remove all connections from Node\n\n this.dropAllConnectionsToNode(targetNode);\n this.dropAllConnectionsFromNode(targetNode); // Changes the css class and turn the node into a JsPlumb Source/Target\n\n if (conqueredByPlayer) {\n targetNode.setControlledByPlayer();\n this.jsplumbinstance.unmakeTarget(targetNode.el);\n this.jsplumbinstance.makeSource(targetNode.el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } else {\n targetNode.setControlledByEnemy();\n nodeObj.conn = null; // Clear connection\n\n this.jsplumbinstance.unmakeSource(targetNode.el);\n this.jsplumbinstance.makeTarget(targetNode.el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n calcStats = true; // Helper function to swap nodes between the respective enemyNodes/playerNodes arrays\n\n function swapNodes(orig, dest, targetNode) {\n for (var i = 0; i < orig.length; ++i) {\n if (orig[i] == targetNode) {\n var node = orig.splice(i, 1);\n node = node[0];\n dest.push(node);\n break;\n }\n }\n }\n\n switch (targetNode.type) {\n case NodeTypes.Core:\n if (conqueredByPlayer) {\n swapNodes(this.enemyCores, this.playerCores, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(this.playerCores, this.enemyCores, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Firewall:\n if (conqueredByPlayer) {\n swapNodes(this.enemyNodes, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Database:\n if (conqueredByPlayer) {\n swapNodes(this.enemyDatabases, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyDatabases, targetNode);\n }\n\n break;\n\n case NodeTypes.Spam:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); // Conquering spam node increases time limit\n\n this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionSpamTimeIncrease;\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Conquering a Transfer node increases the attack of all cores by some percentages\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.playerCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.enemyCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Shield:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n } // If a misc node was conquered, the defense for all misc nodes increases by some fixed amount\n\n\n if (isMiscNode) {\n //&& conqueredByPlayer) {\n this.miscNodes.forEach(node => {\n if (node.targetedCount === 0) {\n node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionMiscDefenseIncrease;\n }\n });\n }\n } // Update node DOMs\n\n\n this.updateNodeDomElement(nodeObj);\n\n if (targetNode) {\n this.updateNodeDomElement(targetNode);\n }\n\n return calcStats;\n}; // Enemy \"AI\" for CPU Core and Transfer Nodes\n\n\nHackingMission.prototype.enemyAISelectAction = function (nodeObj) {\n if (nodeObj == null) {\n return;\n }\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n /**\n * Select a single RANDOM target from miscNodes and player's Nodes\n * If it is reachable, it will target it. If not, no target will\n * be selected for now, and the next time process() gets called this will repeat\n */\n if (nodeObj.conn == null) {\n if (this.miscNodes.length === 0) {\n // Randomly pick a player node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerNodes.length - 1);\n var node;\n\n if (this.playerNodes.length === 0) {\n node = null;\n } else {\n node = this.playerNodes[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n } else {\n // Randomly pick a player core and attack it if its reachable\n rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerCores.length - 1);\n\n if (this.playerCores.length === 0) {\n return; // No Misc Nodes, no player Nodes, no Player cores. Player lost\n } else {\n node = this.playerCores[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n }\n } else {\n // Randomly pick a misc node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.miscNodes.length - 1);\n var node = this.miscNodes[rand];\n\n if (this.nodeReachableByEnemy(node)) {\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n } // If no connection was made, set the Core to Fortify\n\n\n nodeObj.action = NodeActions.Fortify;\n } else {\n // If this node has a selected target\n var targetNode;\n\n if (nodeObj.conn.target) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {\n console.error(\"Error getting Target node Object in enemyAISelectAction()\");\n }\n\n if (targetNode.def > this.enemyAtk + 15) {\n if (nodeObj.def < 50) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) {\n nodeObj.action = NodeActions.Scan;\n } else {\n nodeObj.action = NodeActions.Attack;\n }\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Switch between fortifying and overflowing as necessary\n if (nodeObj.def < 125) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n\n break;\n\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n nodeObj.action = NodeActions.Fortify;\n break;\n\n default:\n break;\n }\n};\n\nvar hackEffWeightSelf = 130; // Weight for Node actions on self\n\nvar hackEffWeightTarget = 25; // Weight for Node Actions against Target\n\nvar hackEffWeightAttack = 80; // Weight for Attack action\n// Returns damage per cycle based on stats\n\nHackingMission.prototype.calculateAttackDamage = function (atk, def, hacking = 0) {\n return Math.max(0.55 * (atk + hacking / hackEffWeightAttack - def), 1);\n};\n\nHackingMission.prototype.calculateScanEffect = function (atk, def, hacking = 0) {\n return Math.max(0.6 * (atk + hacking / hackEffWeightTarget - def * 0.95), 2);\n};\n\nHackingMission.prototype.calculateWeakenEffect = function (atk, def, hacking = 0) {\n return Math.max(atk + hacking / hackEffWeightTarget - def * 0.95, 2);\n};\n\nHackingMission.prototype.calculateFortifyEffect = function (hacking = 0) {\n return 0.9 * hacking / hackEffWeightSelf;\n};\n\nHackingMission.prototype.calculateOverflowEffect = function (hacking = 0) {\n return 0.95 * hacking / hackEffWeightSelf;\n}; // Updates timer display\n\n\nHackingMission.prototype.updateTimer = function () {\n var timer = document.getElementById(\"hacking-mission-timer\"); // Convert time remaining to a string of the form mm:ss\n\n var seconds = Math.round(this.time / 1000);\n var minutes = Math.trunc(seconds / 60);\n seconds %= 60;\n var str = (\"0\" + minutes).slice(-2) + \":\" + (\"0\" + seconds).slice(-2);\n timer.innerText = \"Time left: \" + str;\n}; // The 'win' argument is a bool for whether or not the player won\n\n\nHackingMission.prototype.finishMission = function (win) {\n inMission = false;\n currMission = null;\n\n if (win) {\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"Mission won! You earned \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" reputation with \", this.faction.name));\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainIntelligenceExp(Math.pow(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceHackingMissionBaseExpGain, 0.5));\n this.faction.playerReputation += gain;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Mission lost/forfeited! You did not gain any faction reputation.\");\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/Missions.jsx?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HackingMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return inMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return setInMission; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return currMission; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/addOffset */ 187);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! jsplumb */ 1117);\n/* harmony import */ var jsplumb__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(jsplumb__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n // For some reason `jsplumb` needs to be imported exactly like this,\n// lowercase p, and later in the code used as `jsPlumb` uppercase P. wtf.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\n\n\n\n\nlet inMission = false; // Flag to denote whether a mission is running\n\nlet currMission = null;\n\nfunction setInMission(bool, mission) {\n inMission = bool;\n\n if (bool) {\n currMission = mission;\n } else {\n currMission = null;\n }\n} // Keyboard shortcuts\n\n\n$(document).keydown(function (e) {\n if (inMission && currMission && currMission.selectedNode.length != 0) {\n switch (e.keyCode) {\n case 65:\n // a for Attack\n currMission.actionButtons[0].click();\n break;\n\n case 83:\n // s for Scan\n currMission.actionButtons[1].click();\n break;\n\n case 87:\n // w for Weaken\n currMission.actionButtons[2].click();\n break;\n\n case 70:\n // f for Fortify\n currMission.actionButtons[3].click();\n break;\n\n case 82:\n // r for Overflow\n currMission.actionButtons[4].click();\n break;\n\n case 68:\n // d for Detach connection\n currMission.actionButtons[5].click();\n break;\n\n default:\n break;\n }\n }\n});\nlet NodeTypes = {\n Core: \"CPU Core Node\",\n // All actions available\n Firewall: \"Firewall Node\",\n // No actions available\n Database: \"Database Node\",\n // No actions available\n Spam: \"Spam Node\",\n // No actions Available\n Transfer: \"Transfer Node\",\n // Can Weaken, Scan, Fortify and Overflow\n Shield: \"Shield Node\" // Can Fortify\n\n};\nlet NodeActions = {\n Attack: \"Attacking\",\n // Damaged based on attack stat + hacking level + opp def\n Scan: \"Scanning\",\n // -Def for target, affected by attack and hacking level\n Weaken: \"Weakening\",\n // -Attack for target, affected by attack and hacking level\n Fortify: \"Fortifying\",\n // +Defense for Node, affected by hacking level\n Overflow: \"Overflowing\" // +Attack but -Defense for Node, affected by hacking level\n\n};\n\nfunction Node(type, stats) {\n this.type = type;\n this.atk = stats.atk ? stats.atk : 0;\n this.def = stats.def ? stats.def : 0;\n this.hp = stats.hp ? stats.hp : 0;\n this.maxhp = this.hp;\n this.plyrCtrl = false;\n this.enmyCtrl = false;\n this.pos = [0, 0]; // x, y\n\n this.el = null; // Holds the Node's DOM element\n\n this.action = null;\n this.targetedCount = 0; // Count of how many connections this node is the target of\n\n /**\n * Holds the JsPlumb Connection object for this Node, where this Node is the Source (since each Node\n * can only have 1 outgoing Connection)\n */\n\n this.conn = null;\n}\n\nNode.prototype.setPosition = function (x, y) {\n this.pos = [x, y];\n};\n\nNode.prototype.setControlledByPlayer = function () {\n this.plyrCtrl = true;\n this.enmyCtrl = false;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-enemy-node\");\n this.el.classList.add(\"hack-mission-player-node\");\n }\n};\n\nNode.prototype.setControlledByEnemy = function () {\n this.plyrCtrl = false;\n this.enmyCtrl = true;\n\n if (this.el) {\n this.el.classList.remove(\"hack-mission-player-node\");\n this.el.classList.add(\"hack-mission-enemy-node\");\n }\n}; // Sets this node to be the active node\n\n\nNode.prototype.select = function (actionButtons) {\n if (this.enmyCtrl) {\n return;\n }\n\n this.el.classList.add(\"hack-mission-player-node-active\"); // Make all buttons inactive\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n\n switch (this.type) {\n case NodeTypes.Core:\n // All buttons active\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button-inactive\");\n actionButtons[i].classList.add(\"a-link-button\");\n }\n\n break;\n\n case NodeTypes.Transfer:\n actionButtons[1].classList.remove(\"a-link-button-inactive\");\n actionButtons[1].classList.add(\"a-link-button\");\n actionButtons[2].classList.remove(\"a-link-button-inactive\");\n actionButtons[2].classList.add(\"a-link-button\");\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n actionButtons[4].classList.remove(\"a-link-button-inactive\");\n actionButtons[4].classList.add(\"a-link-button\");\n actionButtons[5].classList.remove(\"a-link-button-inactive\");\n actionButtons[5].classList.add(\"a-link-button\");\n break;\n\n case NodeTypes.Shield:\n case NodeTypes.Firewall:\n actionButtons[3].classList.remove(\"a-link-button-inactive\");\n actionButtons[3].classList.add(\"a-link-button\");\n break;\n\n default:\n break;\n }\n};\n\nNode.prototype.deselect = function (actionButtons) {\n this.el.classList.remove(\"hack-mission-player-node-active\");\n\n for (var i = 0; i < actionButtons.length; ++i) {\n actionButtons[i].classList.remove(\"a-link-button\");\n actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nNode.prototype.untarget = function () {\n if (this.targetedCount === 0) {\n console.warn(`Node ${this.el.id} is being 'untargeted' when it has no target count`);\n return;\n }\n\n --this.targetedCount;\n};\n/**\n * Hacking mission instance\n * @param rep {number} How much reputation the player has for the faction\n * @param fac {Faction} Faction for which this mission is being conducted\n */\n\n\nfunction HackingMission(rep, fac) {\n this.faction = fac;\n this.started = false;\n this.time = 180000; // 5 minutes to start, milliseconds\n\n this.playerCores = [];\n this.playerNodes = []; // Non-core nodes\n\n this.playerAtk = 0;\n this.playerDef = 0;\n this.enemyCores = [];\n this.enemyDatabases = [];\n this.enemyNodes = []; // Non-core nodes\n\n this.enemyAtk = 0;\n this.enemyDef = 0;\n this.miscNodes = [];\n this.selectedNode = []; // Which of the player's nodes are currently selected\n\n this.actionButtons = []; // DOM buttons for actions\n\n this.availablePositions = [];\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.availablePositions.push([r, c]);\n }\n }\n\n this.map = [];\n\n for (var i = 0; i < 8; ++i) {\n this.map.push([null, null, null, null, null, null, null, null]);\n }\n\n this.jsplumbinstance = null;\n this.difficulty = rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToDiffConversion + 1;\n this.reward = 250 + rep / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionRepToRewardConversion;\n}\n\nHackingMission.prototype.init = function () {\n // Create Header DOM\n this.createPageDom(); // Create player starting nodes\n\n var home = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < home.cpuCores; ++i) {\n var stats = {\n atk: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 7.5 + 30,\n def: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 20,\n hp: _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill / 4\n };\n this.playerCores.push(new Node(NodeTypes.Core, stats));\n this.playerCores[i].setControlledByPlayer();\n this.setNodePosition(this.playerCores[i], i, 0);\n this.removeAvailablePosition(i, 0);\n } // Randomly generate enemy nodes (CPU and Firewall) based on difficulty\n\n\n var numNodes = Math.min(8, Math.max(1, Math.round(this.difficulty / 4)));\n var numFirewalls = Math.min(20, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(Math.round(this.difficulty / 3), Math.round(this.difficulty / 3) + 1));\n var numDatabases = Math.min(10, Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(1, Math.round(this.difficulty / 3) + 1));\n var totalNodes = numNodes + numFirewalls + numDatabases;\n var xlimit = 7 - Math.floor(totalNodes / 8);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.8 + this.difficulty / 5, 10);\n\n for (var i = 0; i < numNodes; ++i) {\n var stats = {\n atk: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(80, 86),\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(5, 10),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 230)\n };\n this.enemyCores.push(new Node(NodeTypes.Core, stats));\n this.enemyCores[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyCores[i], xlimit);\n }\n\n for (var i = 0; i < numFirewalls; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(10, 20),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(275, 300)\n };\n this.enemyNodes.push(new Node(NodeTypes.Firewall, stats));\n this.enemyNodes[i].setControlledByEnemy();\n this.setNodeRandomPosition(this.enemyNodes[i], xlimit);\n }\n\n for (var i = 0; i < numDatabases; ++i) {\n var stats = {\n atk: 0,\n def: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 55),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(210, 275)\n };\n var node = new Node(NodeTypes.Database, stats);\n node.setControlledByEnemy();\n this.setNodeRandomPosition(node, xlimit);\n this.enemyDatabases.push(node);\n }\n\n this.calculateDefenses();\n this.calculateAttacks();\n this.createMap();\n};\n\nHackingMission.prototype.createPageDom = function () {\n var container = document.getElementById(\"mission-container\");\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n var headerText = document.createElement(\"p\");\n react_dom__WEBPACK_IMPORTED_MODULE_11___default.a.render(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"You are about to start a hacking mission! You will gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" faction reputation with\", \" \", this.faction.name, \" if you win. Click the 'Start' button to begin.\"), headerText);\n headerText.style.display = \"block\";\n headerText.classList.add(\"hack-mission-header-element\");\n headerText.style.width = \"80%\";\n var inGameGuideBtn = document.createElement(\"a\");\n inGameGuideBtn.innerText = \"How to Play\";\n inGameGuideBtn.classList.add(\"a-link-button\");\n inGameGuideBtn.style.display = \"inline-block\";\n inGameGuideBtn.classList.add(\"hack-mission-header-element\");\n inGameGuideBtn.addEventListener(\"click\", function () {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionHowToPlay);\n return false;\n }); // Start button will get replaced with forfeit when game is started\n\n var startBtn = document.createElement(\"a\");\n startBtn.innerHTML = \"Start\";\n startBtn.setAttribute(\"id\", \"hack-mission-start-btn\");\n startBtn.classList.add(\"a-link-button\");\n startBtn.classList.add(\"hack-mission-header-element\");\n startBtn.style.display = \"inline-block\";\n startBtn.addEventListener(\"click\", () => {\n this.start();\n return false;\n });\n var forfeitMission = document.createElement(\"a\");\n forfeitMission.innerHTML = \"Forfeit Mission (Exit)\";\n forfeitMission.classList.add(\"a-link-button\");\n forfeitMission.classList.add(\"hack-mission-header-element\");\n forfeitMission.style.display = \"inline-block\";\n forfeitMission.addEventListener(\"click\", () => {\n this.finishMission(false);\n return false;\n });\n var timer = document.createElement(\"p\");\n timer.setAttribute(\"id\", \"hacking-mission-timer\");\n timer.style.display = \"inline-block\";\n timer.style.margin = \"6px\"; // Create Action Buttons (Attack/Scan/Weaken/ etc...)\n\n var actionsContainer = document.createElement(\"span\");\n actionsContainer.style.display = \"block\";\n actionsContainer.classList.add(\"hack-mission-action-buttons-container\");\n\n for (var i = 0; i < 6; ++i) {\n this.actionButtons.push(document.createElement(\"a\"));\n this.actionButtons[i].style.display = \"inline-block\";\n this.actionButtons[i].classList.add(\"a-link-button-inactive\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"tooltip\"); // Disabled at start\n\n this.actionButtons[i].classList.add(\"hack-mission-header-element\");\n actionsContainer.appendChild(this.actionButtons[i]);\n }\n\n this.actionButtons[0].innerText = \"Attack(a)\";\n var atkTooltip = document.createElement(\"span\");\n atkTooltip.classList.add(\"tooltiptexthigh\");\n atkTooltip.innerText = \"Lowers the targeted node's HP. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[0].appendChild(atkTooltip);\n this.actionButtons[1].innerText = \"Scan(s)\";\n var scanTooltip = document.createElement(\"span\");\n scanTooltip.classList.add(\"tooltiptexthigh\");\n scanTooltip.innerText = \"Lowers the targeted node's defense. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[1].appendChild(scanTooltip);\n this.actionButtons[2].innerText = \"Weaken(w)\";\n var WeakenTooltip = document.createElement(\"span\");\n WeakenTooltip.classList.add(\"tooltiptexthigh\");\n WeakenTooltip.innerText = \"Lowers the targeted node's attack. The effectiveness of this depends on \" + \"this node's Attack level, your hacking level, and the opponent's defense level.\";\n this.actionButtons[2].appendChild(WeakenTooltip);\n this.actionButtons[3].innerText = \"Fortify(f)\";\n var fortifyTooltip = document.createElement(\"span\");\n fortifyTooltip.classList.add(\"tooltiptexthigh\");\n fortifyTooltip.innerText = \"Raises this node's Defense level. The effectiveness of this depends on \" + \"your hacking level\";\n this.actionButtons[3].appendChild(fortifyTooltip);\n this.actionButtons[4].innerText = \"Overflow(r)\";\n var overflowTooltip = document.createElement(\"span\");\n overflowTooltip.classList.add(\"tooltiptexthigh\");\n overflowTooltip.innerText = \"Raises this node's Attack level but lowers its Defense level. The effectiveness \" + \"of this depends on your hacking level.\";\n this.actionButtons[4].appendChild(overflowTooltip);\n this.actionButtons[5].innerText = \"Drop Connection(d)\";\n var dropconnTooltip = document.createElement(\"span\");\n dropconnTooltip.classList.add(\"tooltiptexthigh\");\n dropconnTooltip.innerText = \"Removes this Node's current connection to some target Node, if it has one. This can \" + \"also be done by simply clicking the white connection line.\";\n this.actionButtons[5].appendChild(dropconnTooltip); // Player/enemy defense displays will be in action container\n\n var playerStats = document.createElement(\"p\");\n var enemyStats = document.createElement(\"p\");\n playerStats.style.display = \"inline-block\";\n enemyStats.style.display = \"inline-block\";\n playerStats.style.color = \"#00ccff\";\n enemyStats.style.color = \"red\";\n playerStats.style.margin = \"4px\";\n enemyStats.style.margin = \"4px\";\n playerStats.setAttribute(\"id\", \"hacking-mission-player-stats\");\n enemyStats.setAttribute(\"id\", \"hacking-mission-enemy-stats\");\n actionsContainer.appendChild(playerStats);\n actionsContainer.appendChild(enemyStats); // Set Action Button event listeners\n\n this.actionButtons[0].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n if (this.selectedNode[0].type !== NodeTypes.Core) {\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Attack, false); // Set attack button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Attack;\n });\n });\n this.actionButtons[1].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Scan, false); // Set scan button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Scan;\n });\n });\n this.actionButtons[2].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type; // In a multiselect, every Node will have the same type\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Weaken, false); // Set Weaken button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Weaken;\n });\n });\n this.actionButtons[3].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.setActionButtonsActive(this.selectedNode[0].type);\n this.setActionButton(NodeActions.Fortify, false); // Set Fortify button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Fortify;\n });\n });\n this.actionButtons[4].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n var nodeType = this.selectedNode[0].type;\n\n if (nodeType !== NodeTypes.Core && nodeType !== NodeTypes.Transfer) {\n return;\n }\n\n this.setActionButtonsActive(nodeType);\n this.setActionButton(NodeActions.Overflow, false); // Set Overflow button inactive\n\n this.selectedNode.forEach(function (node) {\n node.action = NodeActions.Overflow;\n });\n });\n this.actionButtons[5].addEventListener(\"click\", () => {\n if (!(this.selectedNode.length > 0)) {\n console.error(\"Pressing Action button without selected node\");\n return;\n }\n\n this.selectedNode.forEach(function (node) {\n if (node.conn) {\n var endpoints = node.conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }\n\n node.action = NodeActions.Fortify;\n });\n });\n var timeDisplay = document.createElement(\"p\");\n container.appendChild(headerText);\n container.appendChild(inGameGuideBtn);\n container.appendChild(startBtn);\n container.appendChild(forfeitMission);\n container.appendChild(timer);\n container.appendChild(actionsContainer);\n container.appendChild(timeDisplay);\n};\n\nHackingMission.prototype.setActionButtonsInactive = function () {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.setActionButtonsActive = function (nodeType = null) {\n for (var i = 0; i < this.actionButtons.length; ++i) {\n this.actionButtons[i].classList.add(\"a-link-button\");\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n }\n /**\n * For Transfer, FireWall and Shield Nodes, certain buttons should always be disabled\n * 0 = Attack, 1 = Scan, 2 = Weaken, 3 = Fortify, 4 = overflow, 5 = Drop conn\n */\n\n\n if (nodeType) {\n switch (nodeType) {\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n this.actionButtons[1].classList.remove(\"a-link-button\");\n this.actionButtons[1].classList.add(\"a-link-button-inactive\");\n this.actionButtons[2].classList.remove(\"a-link-button\");\n this.actionButtons[2].classList.add(\"a-link-button-inactive\");\n this.actionButtons[4].classList.remove(\"a-link-button\");\n this.actionButtons[4].classList.add(\"a-link-button-inactive\");\n this.actionButtons[5].classList.remove(\"a-link-button\");\n this.actionButtons[5].classList.add(\"a-link-button-inactive\");\n break;\n\n case NodeTypes.Transfer:\n this.actionButtons[0].classList.remove(\"a-link-button\");\n this.actionButtons[0].classList.add(\"a-link-button-inactive\");\n break;\n\n default:\n break;\n }\n }\n}; // True for active, false for inactive\n\n\nHackingMission.prototype.setActionButton = function (i, active = true) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(i)) {\n switch (i) {\n case NodeActions.Attack:\n i = 0;\n break;\n\n case NodeActions.Scan:\n i = 1;\n break;\n\n case NodeActions.Weaken:\n i = 2;\n break;\n\n case NodeActions.Fortify:\n i = 3;\n break;\n\n case NodeActions.Overflow:\n default:\n i = 4;\n break;\n }\n }\n\n if (active) {\n this.actionButtons[i].classList.remove(\"a-link-button-inactive\");\n this.actionButtons[i].classList.add(\"a-link-button\");\n } else {\n this.actionButtons[i].classList.remove(\"a-link-button\");\n this.actionButtons[i].classList.add(\"a-link-button-inactive\");\n }\n};\n\nHackingMission.prototype.calculateAttacks = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].atk;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].atk;\n }\n\n this.playerAtk = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].atk;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].atk;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].atk;\n }\n\n this.enemyAtk = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.calculateDefenses = function () {\n var total = 0;\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n total += this.playerCores[i].def;\n }\n\n for (var i = 0; i < this.playerNodes.length; ++i) {\n total += this.playerNodes[i].def;\n }\n\n this.playerDef = total;\n document.getElementById(\"hacking-mission-player-stats\").innerHTML = \"Player Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerAtk, 1) + \"
\" + \"Player Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.playerDef, 1);\n total = 0;\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n total += this.enemyCores[i].def;\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n total += this.enemyDatabases[i].def;\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n total += this.enemyNodes[i].def;\n }\n\n this.enemyDef = total;\n document.getElementById(\"hacking-mission-enemy-stats\").innerHTML = \"Enemy Attack: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyAtk, 1) + \"
\" + \"Enemy Defense: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(this.enemyDef, 1);\n};\n\nHackingMission.prototype.removeAvailablePosition = function (x, y) {\n for (var i = 0; i < this.availablePositions.length; ++i) {\n if (this.availablePositions[i][0] === x && this.availablePositions[i][1] === y) {\n this.availablePositions.splice(i, 1);\n return;\n }\n }\n\n console.warn(`removeAvailablePosition() did not remove ${x}, ${y}`);\n};\n\nHackingMission.prototype.setNodePosition = function (nodeObj, x, y) {\n if (!(nodeObj instanceof Node)) {\n console.warn(\"Non-Node object passed into setNodePOsition\");\n return;\n }\n\n if (isNaN(x) || isNaN(y)) {\n console.error(`Invalid values (${x}, ${y}) passed as (x, y) for setNodePosition`);\n return;\n }\n\n nodeObj.pos = [x, y];\n this.map[x][y] = nodeObj;\n};\n\nHackingMission.prototype.setNodeRandomPosition = function (nodeObj, xlimit = 0) {\n var i = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.availablePositions.length - 1);\n\n if (this.availablePositions[i][1] < xlimit) {\n // Recurse if not within limit\n return this.setNodeRandomPosition(nodeObj, xlimit);\n }\n\n var pos = this.availablePositions.splice(i, 1);\n pos = pos[0];\n this.setNodePosition(nodeObj, pos[0], pos[1]);\n};\n\nHackingMission.prototype.createMap = function () {\n // Use a grid\n var map = document.createElement(\"div\");\n map.classList.add(\"hack-mission-grid\");\n map.setAttribute(\"id\", \"hacking-mission-map\");\n document.getElementById(\"mission-container\").appendChild(map); // Create random Nodes for every space in the map that\n // hasn't been filled yet. The stats of each Node will be based on\n // the player/enemy attack\n\n var averageAttack = (this.playerAtk + this.enemyAtk) / 2;\n\n for (var x = 0; x < 8; ++x) {\n for (var y = 0; y < 8; ++y) {\n if (!(this.map[x][y] instanceof Node)) {\n var node,\n type = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, 2);\n var randMult = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_5__[/* addOffset */ \"a\"])(0.85 + this.difficulty / 2, 15);\n\n switch (type) {\n case 0:\n // Spam\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(200, 225)\n };\n node = new Node(NodeTypes.Spam, stats);\n break;\n\n case 1:\n // Transfer\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(15, 45),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(250, 275)\n };\n node = new Node(NodeTypes.Transfer, stats);\n break;\n\n case 2: // Shield\n\n default:\n var stats = {\n atk: 0,\n def: averageAttack * 1.1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(30, 70),\n hp: randMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(300, 320)\n };\n node = new Node(NodeTypes.Shield, stats);\n break;\n }\n\n this.setNodePosition(node, x, y);\n this.removeAvailablePosition(x, y);\n this.miscNodes.push(node);\n }\n }\n } // Create DOM elements in order\n\n\n for (var r = 0; r < 8; ++r) {\n for (var c = 0; c < 8; ++c) {\n this.createNodeDomElement(this.map[r][c]);\n }\n } // Configure all Player CPUS\n\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n this.configurePlayerNodeElement(this.playerCores[i].el);\n }\n};\n\nHackingMission.prototype.createNodeDomElement = function (nodeObj) {\n var nodeDiv = document.createElement(\"a\"),\n txtEl = document.createElement(\"p\");\n nodeObj.el = nodeDiv; // Set the node element's id based on its coordinates\n\n var id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n nodeDiv.setAttribute(\"id\", id);\n txtEl.setAttribute(\"id\", id + \"-txt\"); // Set node classes for owner\n\n nodeDiv.classList.add(\"hack-mission-node\");\n\n if (nodeObj.plyrCtrl) {\n nodeDiv.classList.add(\"hack-mission-player-node\");\n } else if (nodeObj.enmyCtrl) {\n nodeDiv.classList.add(\"hack-mission-enemy-node\");\n } // Set node classes based on type\n\n\n var txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-cpu-node\");\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-firewall-node\");\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-database-node\");\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-spam-node\");\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-transfer-node\");\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n nodeDiv.classList.add(\"hack-mission-shield-node\");\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n txtEl.innerHTML = txt;\n nodeDiv.appendChild(txtEl);\n document.getElementById(\"hacking-mission-map\").appendChild(nodeDiv);\n};\n\nHackingMission.prototype.updateNodeDomElement = function (nodeObj) {\n if (nodeObj.el == null) {\n console.error(\"Calling updateNodeDomElement on a Node without an element\");\n return;\n }\n\n let id = \"hacking-mission-node-\" + nodeObj.pos[0] + \"-\" + nodeObj.pos[1];\n let txtEl = document.getElementById(id + \"-txt\"); // Set node classes based on type\n\n let txt;\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n txt = \"CPU Core
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Firewall:\n txt = \"Firewall
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Database:\n txt = \"Database
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Spam:\n txt = \"Spam
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Transfer:\n txt = \"Transfer
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n\n case NodeTypes.Shield:\n default:\n txt = \"Shield
\" + \"HP: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.hp, 1);\n break;\n }\n\n txt += \"
Atk: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.atk, 1) + \"
Def: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(nodeObj.def, 1);\n\n if (nodeObj.action) {\n txt += \"
\" + nodeObj.action;\n }\n\n txtEl.innerHTML = txt;\n};\n/**\n * Gets a Node DOM elements corresponding Node object using its\n * element id. Function accepts either the DOM element object or the ID as\n * an argument\n */\n\n\nHackingMission.prototype.getNodeFromElement = function (el) {\n var id;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__[/* isString */ \"a\"])(el)) {\n id = el;\n } else {\n id = el.id;\n }\n\n id = id.replace(\"hacking-mission-node-\", \"\");\n var res = id.split(\"-\");\n\n if (res.length != 2) {\n console.error(\"Parsing hacking mission node id. could not find coordinates\");\n return null;\n }\n\n var x = res[0],\n y = res[1];\n\n if (isNaN(x) || isNaN(y) || x >= 8 || y >= 8 || x < 0 || y < 0) {\n console.error(`Unexpected values (${x}, ${y}) for (x, y)`);\n return null;\n }\n\n return this.map[x][y];\n};\n\nfunction selectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n nodeObj.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(nodeObj);\n}\n\nfunction multiselectNode(hackMissionInst, el) {\n var nodeObj = hackMissionInst.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node Object in multiselectNode()\");\n }\n\n if (!nodeObj.plyrCtrl) {\n return;\n }\n\n clearAllSelectedNodes(hackMissionInst);\n var type = nodeObj.type;\n\n if (type === NodeTypes.Core) {\n hackMissionInst.playerCores.forEach(function (node) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n });\n } else {\n hackMissionInst.playerNodes.forEach(function (node) {\n if (node.type === type) {\n node.select(hackMissionInst.actionButtons);\n hackMissionInst.selectedNode.push(node);\n }\n });\n }\n}\n\nfunction clearAllSelectedNodes(hackMissionInst) {\n if (hackMissionInst.selectedNode.length > 0) {\n hackMissionInst.selectedNode.forEach(function (node) {\n node.deselect(hackMissionInst.actionButtons);\n });\n hackMissionInst.selectedNode.length = 0;\n }\n}\n/**\n * Configures a DOM element representing a player-owned node to\n * be selectable and actionable.\n * Note: Does NOT change its css class. This is handled by Node.setControlledBy...\n */\n\n\nHackingMission.prototype.configurePlayerNodeElement = function (el) {\n var nodeObj = this.getNodeFromElement(el);\n\n if (nodeObj == null) {\n console.error(\"Failed getting Node object\");\n } // Add event listener\n\n\n const selectNodeWrapper = () => {\n selectNode(this, el);\n };\n\n el.addEventListener(\"click\", selectNodeWrapper);\n\n const multiselectNodeWrapper = () => {\n multiselectNode(this, el);\n };\n\n el.addEventListener(\"dblclick\", multiselectNodeWrapper);\n\n if (el.firstChild) {\n el.firstChild.addEventListener(\"click\", selectNodeWrapper);\n }\n};\n/**\n * Configures a DOM element representing an enemy-node by removing\n * any event listeners\n */\n\n\nHackingMission.prototype.configureEnemyNodeElement = function (el) {\n // Deselect node if it was the selected node\n var nodeObj = this.getNodeFromElement(el);\n\n for (var i = 0; i < this.selectedNode.length; ++i) {\n if (this.selectedNode[i] == nodeObj) {\n nodeObj.deselect(this.actionButtons);\n this.selectedNode.splice(i, 1);\n break;\n }\n }\n};\n/**\n * Returns bool indicating whether a node is reachable by player\n * by checking if any of the adjacent nodes are owned by the player\n */\n\n\nHackingMission.prototype.nodeReachable = function (node) {\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].plyrCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].plyrCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].plyrCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].plyrCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.nodeReachableByEnemy = function (node) {\n if (node == null) {\n return false;\n }\n\n var x = node.pos[0],\n y = node.pos[1];\n\n if (x > 0 && this.map[x - 1][y].enmyCtrl) {\n return true;\n }\n\n if (x < 7 && this.map[x + 1][y].enmyCtrl) {\n return true;\n }\n\n if (y > 0 && this.map[x][y - 1].enmyCtrl) {\n return true;\n }\n\n if (y < 7 && this.map[x][y + 1].enmyCtrl) {\n return true;\n }\n\n return false;\n};\n\nHackingMission.prototype.start = function () {\n this.started = true;\n this.initJsPlumb();\n var startBtn = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_8__[/* clearEventListeners */ \"a\"])(\"hack-mission-start-btn\");\n startBtn.classList.remove(\"a-link-button\");\n startBtn.classList.add(\"a-link-button-inactive\");\n};\n\nHackingMission.prototype.initJsPlumb = function () {\n var instance = jsPlumb.getInstance({\n DragOptions: {\n cursor: \"pointer\",\n zIndex: 2000\n },\n PaintStyle: {\n gradient: {\n stops: [[0, \"#FFFFFF\"], [1, \"#FFFFFF\"]]\n },\n stroke: \"#FFFFFF\",\n strokeWidth: 8\n }\n });\n this.jsplumbinstance = instance; // All player cores are sources\n\n for (var i = 0; i < this.playerCores.length; ++i) {\n instance.makeSource(this.playerCores[i].el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Everything else is a target\n\n\n for (var i = 0; i < this.enemyCores.length; ++i) {\n instance.makeTarget(this.enemyCores[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.enemyDatabases.length; ++i) {\n instance.makeTarget(this.enemyDatabases[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n for (var i = 0; i < this.enemyNodes.length; ++i) {\n instance.makeTarget(this.enemyNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n }\n\n for (var i = 0; i < this.miscNodes.length; ++i) {\n instance.makeTarget(this.miscNodes[i].el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } // Clicking a connection drops it\n\n\n instance.bind(\"click\", conn => {\n // Cannot drop enemy's connections\n const sourceNode = this.getNodeFromElement(conn.source);\n\n if (sourceNode.enmyCtrl) {\n return;\n }\n\n var endpoints = conn.endpoints;\n endpoints[0].detachFrom(endpoints[1]);\n }); // Connection events\n\n instance.bind(\"connection\", info => {\n var targetNode = this.getNodeFromElement(info.target); // Do not detach for enemy nodes\n\n var thisNode = this.getNodeFromElement(info.source);\n\n if (thisNode.enmyCtrl) {\n return;\n } // If the node is not reachable, drop the connection\n\n\n if (!this.nodeReachable(targetNode)) {\n info.sourceEndpoint.detachFrom(info.targetEndpoint);\n return;\n }\n\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = info.connection;\n var targetNode = this.getNodeFromElement(info.target);\n ++targetNode.targetedCount;\n }); // Detach Connection events\n\n instance.bind(\"connectionDetached\", info => {\n var sourceNode = this.getNodeFromElement(info.source);\n sourceNode.conn = null;\n var targetNode = this.getNodeFromElement(info.target);\n targetNode.untarget();\n });\n}; // Drops all connections where the specified node is the source\n\n\nHackingMission.prototype.dropAllConnectionsFromNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].source == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n}; // Drops all connections where the specified node is the target\n\n\nHackingMission.prototype.dropAllConnectionsToNode = function (node) {\n var allConns = this.jsplumbinstance.getAllConnections();\n\n for (var i = allConns.length - 1; i >= 0; --i) {\n if (allConns[i].target == node.el) {\n allConns[i].endpoints[0].detachFrom(allConns[i].endpoints[1]);\n }\n }\n\n node.beingTargeted = false;\n};\n\nvar storedCycles = 0;\n\nHackingMission.prototype.process = function (numCycles = 1) {\n if (!this.started) {\n return;\n }\n\n storedCycles += numCycles;\n\n if (storedCycles < 2) {\n return;\n } // Only process every 3 cycles minimum\n\n\n var res = false; // Process actions of all player nodes\n\n this.playerCores.forEach(node => {\n res |= this.processNode(node, storedCycles);\n });\n this.playerNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n res |= this.processNode(node, storedCycles);\n }\n }); // Process actions of all enemy nodes\n\n this.enemyCores.forEach(node => {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n });\n this.enemyNodes.forEach(node => {\n if (node.type === NodeTypes.Transfer || node.type === NodeTypes.Shield || node.type === NodeTypes.Firewall) {\n this.enemyAISelectAction(node);\n res |= this.processNode(node, storedCycles);\n }\n }); // The hp of enemy databases increases slowly\n\n this.enemyDatabases.forEach(node => {\n node.maxhp += 0.1 * storedCycles;\n node.hp += 0.1 * storedCycles;\n });\n\n if (res) {\n this.calculateAttacks();\n this.calculateDefenses();\n } // Win if all enemy databases are conquered\n\n\n if (this.enemyDatabases.length === 0) {\n this.finishMission(true);\n return;\n } // Lose if all your cores are gone\n\n\n if (this.playerCores.length === 0) {\n this.finishMission(false);\n return;\n } // Defense/hp of misc nodes increases slowly over time\n\n\n this.miscNodes.forEach(node => {\n node.def += 0.1 * storedCycles;\n node.maxhp += 0.05 * storedCycles;\n node.hp += 0.1 * storedCycles;\n\n if (node.hp > node.maxhp) {\n node.hp = node.maxhp;\n }\n\n this.updateNodeDomElement(node);\n }); // Update timer and check if player lost\n\n this.time -= storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (this.time <= 0) {\n this.finishMission(false);\n return;\n }\n\n this.updateTimer();\n storedCycles = 0;\n}; // Returns a bool representing whether defenses need to be re-calculated\n\n\nHackingMission.prototype.processNode = function (nodeObj, numCycles = 1) {\n if (nodeObj.action == null) {\n return;\n }\n\n var targetNode = null,\n def,\n atk;\n\n if (nodeObj.conn) {\n if (nodeObj.conn.target != null) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {// Player is in the middle of dragging the connection,\n // so the target node is null. Do nothing here\n } else if (targetNode.plyrCtrl) {\n def = this.playerDef;\n atk = this.enemyAtk;\n } else if (targetNode.enmyCtrl) {\n def = this.enemyDef;\n atk = this.playerAtk;\n } else {\n // Misc Node\n def = targetNode.def;\n nodeObj.plyrCtrl ? atk = this.playerAtk : atk = this.enemyAtk;\n }\n } // Calculations are per second, so divide everything by 5\n\n\n var calcStats = false,\n plyr = nodeObj.plyrCtrl;\n var enmyHacking = this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionDifficultyToHacking;\n\n switch (nodeObj.action) {\n case NodeActions.Attack:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var dmg = this.calculateAttackDamage(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.hp -= dmg / 5 * numCycles;\n break;\n\n case NodeActions.Scan:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateScanEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.def -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Weaken:\n if (targetNode == null) {\n break;\n }\n\n if (nodeObj.conn == null) {\n break;\n }\n\n var eff = this.calculateWeakenEffect(atk, def, plyr ? _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill : enmyHacking);\n targetNode.atk -= eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Fortify:\n var eff = this.calculateFortifyEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n nodeObj.def += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n case NodeActions.Overflow:\n var eff = this.calculateOverflowEffect(_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_skill);\n\n if (nodeObj.def < eff) {\n break;\n }\n\n nodeObj.def -= eff / 5 * numCycles;\n nodeObj.atk += eff / 5 * numCycles;\n calcStats = true;\n break;\n\n default:\n console.error(`Invalid Node Action: ${nodeObj.action}`);\n break;\n } // Stats can't go below 0\n\n\n if (nodeObj.atk < 0) {\n nodeObj.atk = 0;\n }\n\n if (nodeObj.def < 0) {\n nodeObj.def = 0;\n }\n\n if (targetNode && targetNode.atk < 0) {\n targetNode.atk = 0;\n }\n\n if (targetNode && targetNode.def < 0) {\n targetNode.def = 0;\n } // Conquering a node\n\n\n if (targetNode && targetNode.hp <= 0) {\n var conqueredByPlayer = nodeObj.plyrCtrl;\n targetNode.hp = targetNode.maxhp;\n targetNode.action = null;\n targetNode.conn = null;\n\n if (this.selectedNode == targetNode) {\n targetNode.deselect(this.actionButtons);\n } // The conquered node has its stats reduced\n\n\n targetNode.atk /= 2;\n targetNode.def /= 3.5; // Flag for whether the target node was a misc node\n\n var isMiscNode = !targetNode.plyrCtrl && !targetNode.enmyCtrl; // Remove all connections from Node\n\n this.dropAllConnectionsToNode(targetNode);\n this.dropAllConnectionsFromNode(targetNode); // Changes the css class and turn the node into a JsPlumb Source/Target\n\n if (conqueredByPlayer) {\n targetNode.setControlledByPlayer();\n this.jsplumbinstance.unmakeTarget(targetNode.el);\n this.jsplumbinstance.makeSource(targetNode.el, {\n deleteEndpointsOnEmpty: true,\n maxConnections: 1,\n anchor: \"Continuous\",\n connector: \"Flowchart\"\n });\n } else {\n targetNode.setControlledByEnemy();\n nodeObj.conn = null; // Clear connection\n\n this.jsplumbinstance.unmakeSource(targetNode.el);\n this.jsplumbinstance.makeTarget(targetNode.el, {\n maxConnections: -1,\n anchor: \"Continuous\",\n connector: [\"Flowchart\"]\n });\n }\n\n calcStats = true; // Helper function to swap nodes between the respective enemyNodes/playerNodes arrays\n\n function swapNodes(orig, dest, targetNode) {\n for (var i = 0; i < orig.length; ++i) {\n if (orig[i] == targetNode) {\n var node = orig.splice(i, 1);\n node = node[0];\n dest.push(node);\n break;\n }\n }\n }\n\n switch (targetNode.type) {\n case NodeTypes.Core:\n if (conqueredByPlayer) {\n swapNodes(this.enemyCores, this.playerCores, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(this.playerCores, this.enemyCores, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Firewall:\n if (conqueredByPlayer) {\n swapNodes(this.enemyNodes, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Database:\n if (conqueredByPlayer) {\n swapNodes(this.enemyDatabases, this.playerNodes, targetNode);\n } else {\n swapNodes(this.playerNodes, this.enemyDatabases, targetNode);\n }\n\n break;\n\n case NodeTypes.Spam:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode); // Conquering spam node increases time limit\n\n this.time += _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionSpamTimeIncrease;\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Conquering a Transfer node increases the attack of all cores by some percentages\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.playerCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.enemyCores.forEach(function (node) {\n node.atk *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionTransferAttackIncrease;\n });\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n\n case NodeTypes.Shield:\n if (conqueredByPlayer) {\n swapNodes(isMiscNode ? this.miscNodes : this.enemyNodes, this.playerNodes, targetNode);\n this.configurePlayerNodeElement(targetNode.el);\n } else {\n swapNodes(isMiscNode ? this.miscNodes : this.playerNodes, this.enemyNodes, targetNode);\n this.configureEnemyNodeElement(targetNode.el);\n }\n\n break;\n } // If a misc node was conquered, the defense for all misc nodes increases by some fixed amount\n\n\n if (isMiscNode) {\n //&& conqueredByPlayer) {\n this.miscNodes.forEach(node => {\n if (node.targetedCount === 0) {\n node.def *= _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HackingMissionMiscDefenseIncrease;\n }\n });\n }\n } // Update node DOMs\n\n\n this.updateNodeDomElement(nodeObj);\n\n if (targetNode) {\n this.updateNodeDomElement(targetNode);\n }\n\n return calcStats;\n}; // Enemy \"AI\" for CPU Core and Transfer Nodes\n\n\nHackingMission.prototype.enemyAISelectAction = function (nodeObj) {\n if (nodeObj == null) {\n return;\n }\n\n switch (nodeObj.type) {\n case NodeTypes.Core:\n /**\n * Select a single RANDOM target from miscNodes and player's Nodes\n * If it is reachable, it will target it. If not, no target will\n * be selected for now, and the next time process() gets called this will repeat\n */\n if (nodeObj.conn == null) {\n if (this.miscNodes.length === 0) {\n // Randomly pick a player node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerNodes.length - 1);\n var node;\n\n if (this.playerNodes.length === 0) {\n node = null;\n } else {\n node = this.playerNodes[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n } else {\n // Randomly pick a player core and attack it if its reachable\n rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.playerCores.length - 1);\n\n if (this.playerCores.length === 0) {\n return; // No Misc Nodes, no player Nodes, no Player cores. Player lost\n } else {\n node = this.playerCores[rand];\n }\n\n if (this.nodeReachableByEnemy(node)) {\n // Create connection\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n }\n } else {\n // Randomly pick a misc node and attack it if its reachable\n var rand = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_6__[/* getRandomInt */ \"a\"])(0, this.miscNodes.length - 1);\n var node = this.miscNodes[rand];\n\n if (this.nodeReachableByEnemy(node)) {\n nodeObj.conn = this.jsplumbinstance.connect({\n source: nodeObj.el,\n target: node.el\n });\n ++node.targetedCount;\n }\n } // If no connection was made, set the Core to Fortify\n\n\n nodeObj.action = NodeActions.Fortify;\n } else {\n // If this node has a selected target\n var targetNode;\n\n if (nodeObj.conn.target) {\n targetNode = this.getNodeFromElement(nodeObj.conn.target);\n } else {\n targetNode = this.getNodeFromElement(nodeObj.conn.targetId);\n }\n\n if (targetNode == null) {\n console.error(\"Error getting Target node Object in enemyAISelectAction()\");\n }\n\n if (targetNode.def > this.enemyAtk + 15) {\n if (nodeObj.def < 50) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n } else if (Math.abs(targetNode.def - this.enemyAtk) <= 15) {\n nodeObj.action = NodeActions.Scan;\n } else {\n nodeObj.action = NodeActions.Attack;\n }\n }\n\n break;\n\n case NodeTypes.Transfer:\n // Switch between fortifying and overflowing as necessary\n if (nodeObj.def < 125) {\n nodeObj.action = NodeActions.Fortify;\n } else {\n nodeObj.action = NodeActions.Overflow;\n }\n\n break;\n\n case NodeTypes.Firewall:\n case NodeTypes.Shield:\n nodeObj.action = NodeActions.Fortify;\n break;\n\n default:\n break;\n }\n};\n\nvar hackEffWeightSelf = 130; // Weight for Node actions on self\n\nvar hackEffWeightTarget = 25; // Weight for Node Actions against Target\n\nvar hackEffWeightAttack = 80; // Weight for Attack action\n// Returns damage per cycle based on stats\n\nHackingMission.prototype.calculateAttackDamage = function (atk, def, hacking = 0) {\n return Math.max(0.55 * (atk + hacking / hackEffWeightAttack - def), 1);\n};\n\nHackingMission.prototype.calculateScanEffect = function (atk, def, hacking = 0) {\n return Math.max(0.6 * (atk + hacking / hackEffWeightTarget - def * 0.95), 2);\n};\n\nHackingMission.prototype.calculateWeakenEffect = function (atk, def, hacking = 0) {\n return Math.max(atk + hacking / hackEffWeightTarget - def * 0.95, 2);\n};\n\nHackingMission.prototype.calculateFortifyEffect = function (hacking = 0) {\n return 0.9 * hacking / hackEffWeightSelf;\n};\n\nHackingMission.prototype.calculateOverflowEffect = function (hacking = 0) {\n return 0.95 * hacking / hackEffWeightSelf;\n}; // Updates timer display\n\n\nHackingMission.prototype.updateTimer = function () {\n var timer = document.getElementById(\"hacking-mission-timer\"); // Convert time remaining to a string of the form mm:ss\n\n var seconds = Math.round(this.time / 1000);\n var minutes = Math.trunc(seconds / 60);\n seconds %= 60;\n var str = (\"0\" + minutes).slice(-2) + \":\" + (\"0\" + seconds).slice(-2);\n timer.innerText = \"Time left: \" + str;\n}; // The 'win' argument is a bool for whether or not the player won\n\n\nHackingMission.prototype.finishMission = function (win) {\n inMission = false;\n currMission = null;\n\n if (win) {\n var favorMult = 1 + this.faction.favor / 100;\n var gain = this.reward * _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult * favorMult;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_10___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_10___default.a.Fragment, null, \"Mission won! You earned \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(gain), \" reputation with \", this.faction.name));\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].gainIntelligenceExp(Math.pow(this.difficulty * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].IntelligenceHackingMissionBaseExpGain, 0.5));\n this.faction.playerReputation += gain;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Mission lost/forfeited! You did not gain any faction reputation.\");\n }\n};\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/Missions.jsx?"); /***/ }), -/* 119 */ +/* 120 */ /*!***********************************!*\ !*** ./src/Gang/data/upgrades.ts ***! \***********************************/ @@ -1110,9 +1111,9 @@ eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UpgradeType; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return gangMemberUpgradesMetadata; });\nlet UpgradeType;\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\n\n(function (UpgradeType) {\n UpgradeType[\"Weapon\"] = \"w\";\n UpgradeType[\"Armor\"] = \"a\";\n UpgradeType[\"Vehicle\"] = \"v\";\n UpgradeType[\"Rootkit\"] = \"r\";\n UpgradeType[\"Augmentation\"] = \"g\";\n})(UpgradeType || (UpgradeType = {}));\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nconst gangMemberUpgradesMetadata = [{\n cost: 1e6,\n mults: {\n str: 1.04,\n def: 1.04\n },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 12e6,\n mults: {\n str: 1.08,\n def: 1.08,\n dex: 1.08\n },\n name: \"Katana\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 25e6,\n mults: {\n str: 1.1,\n def: 1.1,\n dex: 1.1,\n agi: 1.1\n },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 50e6,\n mults: {\n str: 1.12,\n def: 1.1,\n agi: 1.1\n },\n name: \"P90C\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 60e6,\n mults: {\n str: 1.2,\n def: 1.15\n },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 100e6,\n mults: {\n str: 1.25,\n def: 1.2\n },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 150e6,\n mults: {\n str: 1.3,\n def: 1.25\n },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 225e6,\n mults: {\n str: 1.3,\n dex: 1.25,\n agi: 1.3\n },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon\n}, {\n cost: 2e6,\n mults: {\n def: 1.04\n },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor\n}, {\n cost: 5e6,\n mults: {\n def: 1.08\n },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 25e6,\n mults: {\n def: 1.15,\n agi: 1.15\n },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 40e6,\n mults: {\n def: 1.2\n },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor\n}, {\n cost: 3e6,\n mults: {\n agi: 1.04,\n cha: 1.04\n },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 9e6,\n mults: {\n agi: 1.08,\n cha: 1.08\n },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 18e6,\n mults: {\n agi: 1.12,\n cha: 1.12\n },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 30e6,\n mults: {\n agi: 1.16,\n cha: 1.16\n },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle\n}, {\n cost: 5e6,\n mults: {\n hack: 1.05\n },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 25e6,\n mults: {\n hack: 1.1\n },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 75e6,\n mults: {\n hack: 1.15\n },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 40e6,\n mults: {\n hack: 1.12\n },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 75e6,\n mults: {\n hack: 1.15\n },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit\n}, {\n cost: 10e9,\n mults: {\n str: 1.3,\n dex: 1.3\n },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 10e9,\n mults: {\n agi: 1.6\n },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 15e9,\n mults: {\n str: 1.15,\n def: 1.15,\n dex: 1.15,\n agi: 1.15\n },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 20e9,\n mults: {\n str: 1.4,\n def: 1.4\n },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 12e9,\n mults: {\n str: 1.2,\n def: 1.2\n },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 25e9,\n mults: {\n str: 1.5,\n agi: 1.5\n },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 15e9,\n mults: {\n str: 1.3,\n def: 1.3\n },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 5e9,\n mults: {\n hack: 1.05\n },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 10e9,\n mults: {\n hack: 1.15\n },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 7.5e9,\n mults: {\n hack: 1.1\n },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation\n}, {\n cost: 50e9,\n mults: {\n str: 1.7,\n def: 1.7\n },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation\n}];\n\n//# sourceURL=webpack:///./src/Gang/data/upgrades.ts?"); /***/ }), -/* 120 */, /* 121 */, -/* 122 */ +/* 122 */, +/* 123 */ /*!************************************!*\ !*** ./src/ui/React/MoneyRate.tsx ***! \************************************/ @@ -1124,7 +1125,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoneyRate; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\nfunction MoneyRate({\n money\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatMoney(money)} / sec`\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/MoneyRate.tsx?"); /***/ }), -/* 123 */ +/* 124 */ /*!***************************************!*\ !*** ./src/ui/React/CopyableText.tsx ***! \***************************************/ @@ -1136,7 +1137,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ClickableTag; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return CopyableText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nlet ClickableTag;\n\n(function (ClickableTag) {\n ClickableTag[ClickableTag[\"Tag_span\"] = 0] = \"Tag_span\";\n ClickableTag[ClickableTag[\"Tag_h1\"] = 1] = \"Tag_h1\";\n})(ClickableTag || (ClickableTag = {}));\n\nclass CopyableText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.copy = this.copy.bind(this);\n this.tooltipClasses = this.tooltipClasses.bind(this);\n this.textClasses = this.textClasses.bind(this);\n this.state = {\n tooltipVisible: false\n };\n }\n\n copy() {\n const copyText = document.createElement(\"textarea\");\n copyText.value = this.props.value;\n document.body.appendChild(copyText);\n copyText.select();\n copyText.setSelectionRange(0, 1e10);\n document.execCommand(\"copy\");\n document.body.removeChild(copyText);\n this.setState({\n tooltipVisible: true\n });\n setTimeout(() => this.setState({\n tooltipVisible: false\n }), 1000);\n }\n\n tooltipClasses() {\n let classes = \"copy_tooltip_text\";\n\n if (this.state.tooltipVisible) {\n classes += \" copy_tooltip_text_visible\";\n }\n\n return classes;\n }\n\n textClasses() {\n let classes = \"copy_tooltip noselect text\";\n\n if (this.state.tooltipVisible) {\n classes += \" copy_tooltip_copied\";\n }\n\n return classes;\n }\n\n render() {\n switch (this.props.tag) {\n case ClickableTag.Tag_h1:\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: this.textClasses(),\n onClick: this.copy\n }, this.props.value, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.tooltipClasses()\n }, \"Copied!\"));\n\n case ClickableTag.Tag_span:\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.textClasses(),\n onClick: this.copy\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, this.props.value), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: this.tooltipClasses()\n }, \"Copied!\"));\n }\n }\n\n}\n\n_defineProperty(CopyableText, \"defaultProps\", {\n //Default span to prevent destroying current clickables\n tag: ClickableTag.Tag_span\n});\n\n//# sourceURL=webpack:///./src/ui/React/CopyableText.tsx?"); /***/ }), -/* 124 */ +/* 125 */ /*!********************************!*\ !*** ./src/NetscriptWorker.js ***! \********************************/ @@ -1145,10 +1146,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPorts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return prestigeWorkerScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return startWorkerScript; });\n/* unused harmony export createAndAddWorkerScript */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return updateOnlineScriptTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllRunningScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return runScriptFromScript; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Netscript/WorkerScript */ 249);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NetscriptFunctions */ 392);\n/* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 707);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptPort */ 263);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Script/RunningScript */ 276);\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script/RunningScriptHelpers */ 437);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! escodegen */ 473);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 309);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! acorn-walk */ 317);\n/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Netscript Ports are instantiated here\n\nconst NetscriptPorts = [];\n\nfor (var i = 0; i < _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NumNetscriptPorts; ++i) {\n NetscriptPorts.push(new _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__[/* NetscriptPort */ \"a\"]());\n}\n\nfunction prestigeWorkerScripts() {\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.env.stopFlag = true;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(ws);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].clear();\n} // JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\n\nfunction startNetscript2Script(workerScript) {\n workerScript.running = true; // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n\n let runningFn = null; // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n\n function wrap(propName, f) {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"sleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg = \"Concurrent calls to Netscript functions not allowed! \" + \"Did you forget to await hack(), grow(), or some other \" + \"promise-returning function? (Currently running: %s tried to run: %s)\";\n\n if (runningFn) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, sprintf(msg, runningFn, propName), null);\n throw workerScript;\n }\n\n runningFn = propName; // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n\n let result;\n\n try {\n result = f(...args);\n } catch (e) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (let prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n } // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n\n\n return Object(_NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__[/* executeJSScript */ \"a\"])(workerScript.getServer().scripts, workerScript).then(function (mainReturnValue) {\n if (mainReturnValue === undefined) return workerScript;\n return [mainReturnValue, workerScript];\n }).catch(e => {\n if (e instanceof Error) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e.message + (e.stack && \"\\nstack:\\n\" + e.stack.toString() || \"\"));\n throw workerScript;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript) {\n const code = workerScript.code;\n workerScript.running = true; //Process imports\n\n var codeWithImports, codeLineOffset;\n\n try {\n let importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n var interpreterInitialization = function (int, scope) {\n //Add the Netscript environment\n var ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"])(workerScript);\n\n for (let name in ns) {\n let entry = ns[name];\n\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (name === \"hack\" || name === \"grow\" || name === \"weaken\" || name === \"sleep\" || name === \"prompt\" || name === \"manualHack\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length - 1; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n let cb = arguments[arguments.length - 1];\n let fnPromise = entry.apply(null, fnArgs);\n fnPromise.then(function (res) {\n cb(res);\n }).catch(function (err) {\n console.error(err);\n });\n };\n\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (name === \"sprintf\" || name === \"vsprintf\" || name === \"scp\" || name == \"write\" || name === \"read\" || name === \"tryWrite\" || name === \"run\" || name === \"exec\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n return entry.apply(null, fnArgs);\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n let tempWrapper = function () {\n let res = entry.apply(null, arguments);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n } //Add the arguments\n\n\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n var interpreter;\n\n try {\n interpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__[/* Interpreter */ \"a\"](codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter() {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n if (interpreter.step()) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__[/* setTimeoutRef */ \"a\"])(runInterpreter, _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__[/* Settings */ \"a\"].CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\n e = e.toString();\n\n if (!Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n e = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e);\n }\n\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__[/* isString */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\n\n\nfunction processNetscript1Imports(code, workerScript) {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n var server = workerScript.getServer();\n\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName) {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n\n let hasImports = false; // Walk over the tree and process ImportDeclaration nodes\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(ast, {\n ImportDeclaration: node => {\n hasImports = true;\n let scriptName = node.source.value;\n\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n\n let script = getScript(scriptName);\n\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n\n let scriptAst = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n let namespace = node.specifiers[0].local.name;\n let fnNames = []; //Names only\n\n let fnDeclarations = []; //FunctionDeclaration Node objects\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n }\n }); //Now we have to generate the code that would create the namespace\n\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\"; //Add the function declarations\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n }); //Add functions to namespace\n\n fnNames.forEach(fnName => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n }); //Finish\n\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n //Get array of all fns to import\n let fnsToImport = [];\n node.specifiers.forEach(e => {\n fnsToImport.push(e.local.name);\n }); //Walk through script and get FunctionDeclaration code for all specified fns\n\n let fnDeclarations = [];\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n }\n }); //Convert FunctionDeclarations into code\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n });\n }\n }\n }); //If there are no imports, just return the original code\n\n if (!hasImports) {\n return {\n code: code,\n lineOffset: 0\n };\n } //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n\n\n var linesRemoved = 0;\n\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n } //Calculated line offset\n\n\n var lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved; //Convert the AST back into code\n\n code = Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(ast); //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n\n code = generatedCode + code;\n var res = {\n code: code,\n lineOffset: lineOffset\n };\n return res;\n}\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\n\n\nfunction startWorkerScript(runningScript, server, parent) {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript, _Player__WEBPACK_IMPORTED_MODULE_12__[/* Player */ \"a\"].hacknet_node_money_mult); // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n\n return runningScript.pid;\n }\n\n return 0;\n}\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\n\nfunction createAndAddWorkerScript(runningScriptObj, server, parent) {\n // Update server's ram usage\n let threads = 1;\n\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n\n const ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__[/* getRamUsageFromRunningScript */ \"a\"])(runningScriptObj) * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (ramUsage > ramAvailable) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(`Not enough RAM to run script ${runningScriptObj.filename} with args ` + `${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(runningScriptObj.args)}. This likely occurred because you re-loaded ` + `the game and the script's RAM usage increased (either because of an update to the game or ` + `your changes to the script.)`);\n return false;\n }\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(server.ramUsed + ramUsage); // Get the pid\n\n const pid = Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__[/* generateNextPid */ \"a\"])();\n\n if (pid === -1) {\n throw new Error(`Failed to start script because could not find available PID. This is most ` + `because you have too many scripts running.`);\n } // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n\n\n const s = new _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"](runningScriptObj, pid, _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"]);\n s.ramUsage = ramUsage; // Add the WorkerScript to the global pool\n\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].set(pid, s);\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent(); // Start the script's execution\n\n let p = null; // Script's resulting promise\n\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n\n if (!(p instanceof Promise)) {\n return false;\n }\n } // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n\n\n p.then(function (w) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent && parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n } // If the WorkerScript is no longer \"running\", then this means its execution was\n // already stopped somewhere else (maybe by something like exit()). This prevents\n // the script from being cleaned up twice\n\n\n if (!w.running) {\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n w.log(\"\", \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|\");\n\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + errorText);\n return;\n }\n\n const serverIp = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `RUNTIME ERROR
${scriptName}@${serverIp}
`;\n\n if (w.args.length > 0) {\n msg += `Args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(w.args)}
`;\n }\n\n msg += \"
\";\n msg += errorMsg;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(msg);\n w.log(\"\", \"Script crashed with runtime error\");\n } else {\n w.log(\"\", \"Script killed\");\n return; // Already killed, so stop here\n }\n\n w.running = false;\n w.env.stopFlag = true;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n });\n return true;\n}\n/**\n * Updates the online running time stat of all running scripts\n */\n\nfunction updateOnlineScriptTimes(numCycles = 1) {\n var time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed / 1000; //seconds\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\n\nfunction loadAllRunningScripts() {\n let skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n\n for (const property in _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"]) {\n if (_Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"].hasOwnProperty(property)) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"][property]; // Reset each server's RAM usage to 0\n\n server.ramUsed = 0; // Reset modules on all scripts\n\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server); // Offline production\n\n Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__[/* scriptCalculateOfflineProduction */ \"c\"])(server.runningScripts[j]);\n }\n }\n }\n }\n}\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\n\nfunction runScriptFromScript(caller, server, scriptname, args, workerScript, threads = 1) {\n // Sanitize arguments\n if (!(workerScript instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"])) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, `Invalid arguments: scriptname='${scriptname} args='${ags}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n } // Check if the script is already running\n\n\n let runningScriptObj = server.getRunningScript(scriptname, args);\n\n if (runningScriptObj != null) {\n workerScript.log(caller, `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n } // 'null/undefined' arguments are not allowed\n\n\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptname) {\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n\n if (threads === 0) {\n return 0;\n }\n\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(caller, `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`);\n return 0;\n } else {\n // Able to run script\n workerScript.log(caller, `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(args)}.`);\n let runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__[/* RunningScript */ \"a\"](script, args);\n runningScriptObj.threads = threads;\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/NetscriptWorker.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPorts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return prestigeWorkerScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return startWorkerScript; });\n/* unused harmony export createAndAddWorkerScript */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return updateOnlineScriptTimes; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadAllRunningScripts; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return runScriptFromScript; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Netscript/WorkerScript */ 249);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Netscript/Pid */ 392);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./JSInterpreter */ 440);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./NetscriptFunctions */ 393);\n/* harmony import */ var _NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./NetscriptJSEvaluator */ 707);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./NetscriptPort */ 264);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Script/RunningScript */ 277);\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Script/RunningScriptHelpers */ 438);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! escodegen */ 474);\n/* harmony import */ var escodegen__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(escodegen__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../utils/helpers/roundToTwo */ 311);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! acorn-walk */ 319);\n/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Netscript Ports are instantiated here\n\nconst NetscriptPorts = [];\n\nfor (var i = 0; i < _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].NumNetscriptPorts; ++i) {\n NetscriptPorts.push(new _NetscriptPort__WEBPACK_IMPORTED_MODULE_11__[/* NetscriptPort */ \"a\"]());\n}\n\nfunction prestigeWorkerScripts() {\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.env.stopFlag = true;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(ws);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].clear();\n} // JS script promises need a little massaging to have the same guarantees as netscript\n// promises. This does said massaging and kicks the script off. It returns a promise\n// that resolves or rejects when the corresponding worker script is done.\n\nfunction startNetscript2Script(workerScript) {\n workerScript.running = true; // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n\n let runningFn = null; // We need to go through the environment and wrap each function in such a way that it\n // can be called at most once at a time. This will prevent situations where multiple\n // hack promises are outstanding, for example.\n\n function wrap(propName, f) {\n // This function unfortunately cannot be an async function, because we don't\n // know if the original one was, and there's no way to tell.\n return function (...args) {\n // Wrap every netscript function with a check for the stop flag.\n // This prevents cases where we never stop because we are only calling\n // netscript functions that don't check this.\n // This is not a problem for legacy Netscript because it also checks the\n // stop flag in the evaluator.\n if (workerScript.env.stopFlag) {\n throw workerScript;\n }\n\n if (propName === \"sleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg = \"Concurrent calls to Netscript functions not allowed! \" + \"Did you forget to await hack(), grow(), or some other \" + \"promise-returning function? (Currently running: %s tried to run: %s)\";\n\n if (runningFn) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, sprintf(msg, runningFn, propName), null);\n throw workerScript;\n }\n\n runningFn = propName; // If the function throws an error, clear the runningFn flag first, and then re-throw it\n // This allows people to properly catch errors thrown by NS functions without getting\n // the concurrent call error above\n\n let result;\n\n try {\n result = f(...args);\n } catch (e) {\n runningFn = null;\n throw e;\n }\n\n if (result && result.finally !== undefined) {\n return result.finally(function () {\n runningFn = null;\n });\n } else {\n runningFn = null;\n return result;\n }\n };\n }\n\n for (let prop in workerScript.env.vars) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n } // Note: the environment that we pass to the JS script only needs to contain the functions visible\n // to that script, which env.vars does at this point.\n\n\n return Object(_NetscriptJSEvaluator__WEBPACK_IMPORTED_MODULE_10__[/* executeJSScript */ \"a\"])(workerScript.getServer().scripts, workerScript).then(function (mainReturnValue) {\n if (mainReturnValue === undefined) return workerScript;\n return [mainReturnValue, workerScript];\n }).catch(e => {\n if (e instanceof Error) {\n workerScript.errorMessage = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e.message + (e.stack && \"\\nstack:\\n\" + e.stack.toString() || \"\"));\n throw workerScript;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n }\n\n throw e; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript) {\n const code = workerScript.code;\n workerScript.running = true; //Process imports\n\n var codeWithImports, codeLineOffset;\n\n try {\n let importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n var interpreterInitialization = function (int, scope) {\n //Add the Netscript environment\n var ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"])(workerScript);\n\n for (let name in ns) {\n let entry = ns[name];\n\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if (name === \"hack\" || name === \"grow\" || name === \"weaken\" || name === \"sleep\" || name === \"prompt\" || name === \"manualHack\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length - 1; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n let cb = arguments[arguments.length - 1];\n let fnPromise = entry.apply(null, fnArgs);\n fnPromise.then(function (res) {\n cb(res);\n }).catch(function (err) {\n console.error(err);\n });\n };\n\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (name === \"sprintf\" || name === \"vsprintf\" || name === \"scp\" || name == \"write\" || name === \"read\" || name === \"tryWrite\" || name === \"run\" || name === \"exec\") {\n let tempWrapper = function () {\n let fnArgs = []; //All of the Object/array elements are in JSInterpreter format, so\n //we have to convert them back to native format to pass them to these fns\n\n for (let i = 0; i < arguments.length; ++i) {\n if (typeof arguments[i] === \"object\" || arguments[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(arguments[i]));\n } else {\n fnArgs.push(arguments[i]);\n }\n }\n\n return entry.apply(null, fnArgs);\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n let tempWrapper = function () {\n let res = entry.apply(null, arguments);\n\n if (res == null) {\n return res;\n } else if (res.constructor === Array || res === Object(res)) {\n //Objects and Arrays must be converted to the interpreter's format\n return int.nativeToPseudo(res);\n } else {\n return res;\n }\n };\n\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n }\n } else {\n //bladeburner, or anything else\n int.setProperty(scope, name, int.nativeToPseudo(entry));\n }\n } //Add the arguments\n\n\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n var interpreter;\n\n try {\n interpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_7__[/* Interpreter */ \"a\"](codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(workerScript);\n return;\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter() {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n if (interpreter.step()) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_18__[/* setTimeoutRef */ \"a\"])(runInterpreter, _Settings_Settings__WEBPACK_IMPORTED_MODULE_17__[/* Settings */ \"a\"].CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e) {\n e = e.toString();\n\n if (!Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(e)) {\n e = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, e);\n }\n\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_23__[/* isString */ \"a\"])(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\n }\n });\n}\n/* Since the JS Interpreter used for Netscript 1.0 only supports ES5, the keyword\n 'import' throws an error. However, since we want to support import funtionality\n we'll implement it ourselves by parsing the Nodes in the AST out.\n\n @param code - The script's code\n @returns {Object} {\n code: Newly-generated code with imported functions\n lineOffset: Net number of lines of code added/removed due to imported functions\n Should typically be positive\n }\n*/\n\n\nfunction processNetscript1Imports(code, workerScript) {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n var server = workerScript.getServer();\n\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName) {\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptName) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n\n let hasImports = false; // Walk over the tree and process ImportDeclaration nodes\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(ast, {\n ImportDeclaration: node => {\n hasImports = true;\n let scriptName = node.source.value;\n\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n\n let script = getScript(scriptName);\n\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n\n let scriptAst = Object(acorn__WEBPACK_IMPORTED_MODULE_24__[/* parse */ \"b\"])(script.code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\"\n });\n\n if (node.specifiers.length === 1 && node.specifiers[0].type === \"ImportNamespaceSpecifier\") {\n // import * as namespace from script\n let namespace = node.specifiers[0].local.name;\n let fnNames = []; //Names only\n\n let fnDeclarations = []; //FunctionDeclaration Node objects\n\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n }\n }); //Now we have to generate the code that would create the namespace\n\n generatedCode += \"var \" + namespace + \";\\n\" + \"(function (namespace) {\\n\"; //Add the function declarations\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n }); //Add functions to namespace\n\n fnNames.forEach(fnName => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n }); //Finish\n\n generatedCode += \"})(\" + namespace + \" || \" + \"(\" + namespace + \" = {}));\\n\";\n } else {\n //import {...} from script\n //Get array of all fns to import\n let fnsToImport = [];\n node.specifiers.forEach(e => {\n fnsToImport.push(e.local.name);\n }); //Walk through script and get FunctionDeclaration code for all specified fns\n\n let fnDeclarations = [];\n Object(acorn_walk__WEBPACK_IMPORTED_MODULE_25__[/* simple */ \"b\"])(scriptAst, {\n FunctionDeclaration: node => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n }\n }); //Convert FunctionDeclarations into code\n\n fnDeclarations.forEach(fn => {\n generatedCode += Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(fn);\n generatedCode += \"\\n\";\n });\n }\n }\n }); //If there are no imports, just return the original code\n\n if (!hasImports) {\n return {\n code: code,\n lineOffset: 0\n };\n } //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n\n\n var linesRemoved = 0;\n\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\n }\n\n for (let i = ast.body.length - 1; i >= 0; --i) {\n if (ast.body[i].type === \"ImportDeclaration\") {\n ast.body.splice(i, 1);\n ++linesRemoved;\n }\n } //Calculated line offset\n\n\n var lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved; //Convert the AST back into code\n\n code = Object(escodegen__WEBPACK_IMPORTED_MODULE_19__[\"generate\"])(ast); //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n\n code = generatedCode + code;\n var res = {\n code: code,\n lineOffset: lineOffset\n };\n return res;\n}\n/**\n * Used to start a RunningScript (by creating and starting its\n * corresponding WorkerScript), and add the RunningScript to the server on which\n * it is active\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * @returns {number} pid of started script\n */\n\n\nfunction startWorkerScript(runningScript, server, parent) {\n if (createAndAddWorkerScript(runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript, _Player__WEBPACK_IMPORTED_MODULE_12__[/* Player */ \"a\"].hacknet_node_money_mult); // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n\n return runningScript.pid;\n }\n\n return 0;\n}\n/**\n * Given a RunningScript object, constructs its corresponding WorkerScript,\n * adds it to the global 'workerScripts' pool, and begins executing it.\n * @param {RunningScript} runningScriptObj - Script that's being run\n * @param {Server} server - Server on which the script is to be run\n * returns {boolean} indicating whether or not the workerScript was successfully added\n */\n\nfunction createAndAddWorkerScript(runningScriptObj, server, parent) {\n // Update server's ram usage\n let threads = 1;\n\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n\n const ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_14__[/* getRamUsageFromRunningScript */ \"a\"])(runningScriptObj) * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (ramUsage > ramAvailable) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(`Not enough RAM to run script ${runningScriptObj.filename} with args ` + `${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(runningScriptObj.args)}. This likely occurred because you re-loaded ` + `the game and the script's RAM usage increased (either because of an update to the game or ` + `your changes to the script.)`);\n return false;\n }\n\n server.ramUsed = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_22__[/* roundToTwo */ \"a\"])(server.ramUsed + ramUsage); // Get the pid\n\n const pid = Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_4__[/* generateNextPid */ \"a\"])();\n\n if (pid === -1) {\n throw new Error(`Failed to start script because could not find available PID. This is most ` + `because you have too many scripts running.`);\n } // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n\n\n const s = new _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"](runningScriptObj, pid, _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_9__[/* NetscriptFunctions */ \"a\"]);\n s.ramUsage = ramUsage; // Add the WorkerScript to the global pool\n\n _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].set(pid, s);\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent(); // Start the script's execution\n\n let p = null; // Script's resulting promise\n\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(s);\n } else {\n p = startNetscript1Script(s);\n\n if (!(p instanceof Promise)) {\n return false;\n }\n } // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n\n\n p.then(function (w) {\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent && parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n } // If the WorkerScript is no longer \"running\", then this means its execution was\n // already stopped somewhere else (maybe by something like exit()). This prevents\n // the script from being cleaned up twice\n\n\n if (!w.running) {\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n w.log(\"\", \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else if (w instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"]) {\n if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|\");\n\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + errorText);\n return;\n }\n\n const serverIp = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `RUNTIME ERROR
${scriptName}@${serverIp}
`;\n\n if (w.args.length > 0) {\n msg += `Args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(w.args)}
`;\n }\n\n msg += \"
\";\n msg += errorMsg;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(msg);\n w.log(\"\", \"Script crashed with runtime error\");\n } else {\n w.log(\"\", \"Script killed\");\n return; // Already killed, so stop here\n }\n\n w.running = false;\n w.env.stopFlag = true;\n } else if (Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_8__[/* isScriptErrorMessage */ \"a\"])(w)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" + w.toString());\n return;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_20__[/* dialogBoxCreate */ \"a\"])(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(s);\n });\n return true;\n}\n/**\n * Updates the online running time stat of all running scripts\n */\n\nfunction updateOnlineScriptTimes(numCycles = 1) {\n var time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed / 1000; //seconds\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_2__[/* workerScripts */ \"a\"].values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\n}\n/**\n * Called when the game is loaded. Loads all running scripts (from all servers)\n * into worker scripts so that they will start running\n */\n\nfunction loadAllRunningScripts() {\n let skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n\n if (skipScriptLoad) {\n console.info(\"Skipping the load of any scripts during startup\");\n }\n\n for (const property in _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"]) {\n if (_Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"].hasOwnProperty(property)) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_16__[/* AllServers */ \"b\"][property]; // Reset each server's RAM usage to 0\n\n server.ramUsed = 0; // Reset modules on all scripts\n\n for (let i = 0; i < server.scripts.length; ++i) {\n server.scripts[i].markUpdated();\n }\n\n if (skipScriptLoad) {\n // Start game with no scripts\n server.runningScripts.length = 0;\n } else {\n for (let j = 0; j < server.runningScripts.length; ++j) {\n createAndAddWorkerScript(server.runningScripts[j], server); // Offline production\n\n Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_15__[/* scriptCalculateOfflineProduction */ \"c\"])(server.runningScripts[j]);\n }\n }\n }\n }\n}\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\n\nfunction runScriptFromScript(caller, server, scriptname, args, workerScript, threads = 1) {\n // Sanitize arguments\n if (!(workerScript instanceof _Netscript_WorkerScript__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScript */ \"a\"])) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, `Invalid arguments: scriptname='${scriptname} args='${ags}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n } // Check if the script is already running\n\n\n let runningScriptObj = server.getRunningScript(scriptname, args);\n\n if (runningScriptObj != null) {\n workerScript.log(caller, `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n } // 'null/undefined' arguments are not allowed\n\n\n for (let i = 0; i < args.length; ++i) {\n if (args[i] == null) {\n workerScript.log(caller, \"Cannot execute a script with null/undefined as an argument\");\n return 0;\n }\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === scriptname) {\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n let ramUsage = script.ramUsage;\n threads = Math.round(Number(threads));\n\n if (threads === 0) {\n return 0;\n }\n\n ramUsage = ramUsage * threads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (server.hasAdminRights == false) {\n workerScript.log(caller, `You do not have root access on '${server.hostname}'`);\n return 0;\n } else if (ramUsage > ramAvailable) {\n workerScript.log(caller, `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`);\n return 0;\n } else {\n // Able to run script\n workerScript.log(caller, `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_21__[/* arrayToString */ \"a\"])(args)}.`);\n let runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_13__[/* RunningScript */ \"a\"](script, args);\n runningScriptObj.threads = threads;\n return startWorkerScript(runningScriptObj, server, workerScript);\n }\n }\n }\n\n workerScript.log(caller, `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n\n//# sourceURL=webpack:///./src/NetscriptWorker.js?"); /***/ }), -/* 125 */ +/* 126 */ /*!********************************************!*\ !*** ./src/Faction/FactionWorkTypeEnum.ts ***! \********************************************/ @@ -1160,8 +1161,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionWorkType; });\nlet FactionWorkType;\n\n(function (FactionWorkType) {\n FactionWorkType[FactionWorkType[\"Field\"] = 0] = \"Field\";\n FactionWorkType[FactionWorkType[\"Hacking\"] = 1] = \"Hacking\";\n FactionWorkType[FactionWorkType[\"None\"] = 2] = \"None\";\n FactionWorkType[FactionWorkType[\"Security\"] = 3] = \"Security\";\n})(FactionWorkType || (FactionWorkType = {}));\n\n//# sourceURL=webpack:///./src/Faction/FactionWorkTypeEnum.ts?"); /***/ }), -/* 126 */, -/* 127 */ +/* 127 */, +/* 128 */ /*!************************************************!*\ !*** ./utils/helpers/createProgressBarText.ts ***! \************************************************/ @@ -1173,7 +1174,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createProgressBarText; });\n/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nfunction createProgressBarText(params) {\n // Default values\n const defaultParams = {\n progress: 0,\n totalTicks: 20\n }; // tslint:disable-next-line:prefer-object-spread\n\n const derived = Object.assign({}, defaultParams, params); // Ensure it is 0..1\n\n derived.progress = Math.max(Math.min(derived.progress, 1), 0); // This way there is always at least one bar filled in...\n\n const bars = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes = Math.max(derived.totalTicks - bars, 0); // String.prototype.repeat isn't completley supported, but good enough for our purposes\n\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/createProgressBarText.ts?"); /***/ }), -/* 128 */ +/* 129 */ /*!************************************!*\ !*** ./src/utils/SetTimeoutRef.ts ***! \************************************/ @@ -1185,8 +1186,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return setTimeoutRef; });\n// This is a reference to the native setTimeout() function\n// setTimeout() is used in various places around the game's source code.\n// This reference is used to make sure that if players alter window.setTimeout()\n// through NetscriptJS, then the game will still function properly\nconst setTimeoutRef = window.setTimeout.bind(window);\n\n//# sourceURL=webpack:///./src/utils/SetTimeoutRef.ts?"); /***/ }), -/* 129 */, -/* 130 */ +/* 130 */, +/* 131 */ /*!*************************************!*\ !*** ./src/Corporation/Material.ts ***! \*************************************/ @@ -1198,7 +1199,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Material; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass Material {\n // Name of material\n // Amount of material owned\n // Material's \"quality\". Unbounded\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n // Maximum volatility of this Materials stats\n // Markup. Determines how high of a price you can charge on the material\n // compared to the market price without suffering loss in # of sales\n // Quality is divided by this to determine markup limits\n // e,g, If mku is 10 and quality is 100 then you can markup prices by 100/10 = 10\n // How much of this material is being bought, sold, imported and produced every second\n // Exports of this material to another warehouse/industry\n // Total amount of this material exported in the last cycle\n // Cost / sec to buy this material. AKA Market Price\n // Cost / sec to sell this material\n // Flags to keep track of whether production and/or sale of this material is limited\n // [Whether production/sale is limited, limit amount]\n // Production\n // Sale\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"InitName\");\n\n _defineProperty(this, \"qty\", 0);\n\n _defineProperty(this, \"qlt\", 0);\n\n _defineProperty(this, \"dmd\", 0);\n\n _defineProperty(this, \"dmdR\", [0, 0]);\n\n _defineProperty(this, \"cmp\", 0);\n\n _defineProperty(this, \"cmpR\", [0, 0]);\n\n _defineProperty(this, \"mv\", 0);\n\n _defineProperty(this, \"mku\", 0);\n\n _defineProperty(this, \"buy\", 0);\n\n _defineProperty(this, \"sll\", 0);\n\n _defineProperty(this, \"prd\", 0);\n\n _defineProperty(this, \"imp\", 0);\n\n _defineProperty(this, \"exp\", []);\n\n _defineProperty(this, \"totalExp\", 0);\n\n _defineProperty(this, \"bCost\", 0);\n\n _defineProperty(this, \"sCost\", 0);\n\n _defineProperty(this, \"prdman\", [false, 0]);\n\n _defineProperty(this, \"sllman\", [false, 0]);\n\n _defineProperty(this, \"marketTa1\", false);\n\n _defineProperty(this, \"marketTa2\", false);\n\n _defineProperty(this, \"marketTa2Price\", 0);\n\n if (params.name) {\n this.name = params.name;\n }\n\n this.init();\n }\n\n getMarkupLimit() {\n return this.qlt / this.mku;\n }\n\n init() {\n switch (this.name) {\n case \"Water\":\n this.dmd = 75;\n this.dmdR = [65, 85];\n this.cmp = 50;\n this.cmpR = [40, 60];\n this.bCost = 1500;\n this.mv = 0.2;\n this.mku = 6;\n break;\n\n case \"Energy\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 2000;\n this.mv = 0.2;\n this.mku = 6;\n break;\n\n case \"Food\":\n this.dmd = 80;\n this.dmdR = [70, 90];\n this.cmp = 60;\n this.cmpR = [35, 85];\n this.bCost = 5000;\n this.mv = 1;\n this.mku = 3;\n break;\n\n case \"Plants\":\n this.dmd = 70;\n this.dmdR = [20, 90];\n this.cmp = 50;\n this.cmpR = [30, 70];\n this.bCost = 3000;\n this.mv = 0.6;\n this.mku = 3.75;\n break;\n\n case \"Metal\":\n this.dmd = 80;\n this.dmdR = [75, 85];\n this.cmp = 70;\n this.cmpR = [60, 80];\n this.bCost = 2650;\n this.mv = 1;\n this.mku = 6;\n break;\n\n case \"Hardware\":\n this.dmd = 85;\n this.dmdR = [80, 90];\n this.cmp = 80;\n this.cmpR = [65, 95];\n this.bCost = 8e3;\n this.mv = 0.5; //Less mv bc its processed twice\n\n this.mku = 1;\n break;\n\n case \"Chemicals\":\n this.dmd = 55;\n this.dmdR = [40, 70];\n this.cmp = 60;\n this.cmpR = [40, 80];\n this.bCost = 9e3;\n this.mv = 1.2;\n this.mku = 2;\n break;\n\n case \"Real Estate\":\n this.dmd = 50;\n this.dmdR = [5, 99];\n this.cmp = 50;\n this.cmpR = [25, 75];\n this.bCost = 80e3;\n this.mv = 1.5; //Less mv bc its processed twice\n\n this.mku = 1.5;\n break;\n\n case \"Drugs\":\n this.dmd = 60;\n this.dmdR = [45, 75];\n this.cmp = 70;\n this.cmpR = [40, 99];\n this.bCost = 40e3;\n this.mv = 1.6;\n this.mku = 1;\n break;\n\n case \"Robots\":\n this.dmd = 90;\n this.dmdR = [80, 9];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 75e3;\n this.mv = 0.5; //Less mv bc its processed twice\n\n this.mku = 1;\n break;\n\n case \"AI Cores\":\n this.dmd = 90;\n this.dmdR = [80, 99];\n this.cmp = 90;\n this.cmpR = [80, 9];\n this.bCost = 15e3;\n this.mv = 0.8; //Less mv bc its processed twice\n\n this.mku = 0.5;\n break;\n\n case \"Scientific Research\":\n case \"InitName\":\n break;\n\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n } // Process change in demand, competition, and buy cost of this material\n\n\n processMarket() {\n // The price will change in accordance with demand and competition.\n // e.g. If demand goes up, then so does price. If competition goes up, price goes down\n const priceVolatility = Math.random() * this.mv / 300;\n const priceChange = 1 + priceVolatility; //This 1st random check determines whether competition increases or decreases\n\n const compVolatility = Math.random() * this.mv / 100;\n const compChange = 1 + compVolatility;\n\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n\n this.bCost *= priceChange; // Competition decreases, so price goes up\n } // This 2nd random check determines whether demand increases or decreases\n\n\n const dmdVolatility = Math.random() * this.mv / 100;\n const dmdChange = 1 + dmdVolatility;\n\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n\n this.bCost *= 1 / priceChange;\n }\n }\n\n copy() {\n const material = new Material();\n material.name = this.name;\n material.qty = this.qty;\n material.qlt = this.qlt;\n material.dmd = this.dmd;\n material.cmp = this.cmp;\n material.mv = this.mv;\n material.mku = this.mku;\n material.buy = this.buy;\n material.sll = this.sll;\n material.prd = this.prd;\n material.imp = this.imp;\n material.totalExp = this.totalExp;\n material.bCost = this.bCost;\n material.marketTa1 = this.marketTa1;\n material.marketTa2 = this.marketTa2;\n material.marketTa2Price = this.marketTa2Price;\n material.sCost = this.sCost;\n material.prdman = [this.prdman[0], this.prdman[1]];\n material.sllman = [this.sllman[0], this.sllman[1]];\n material.dmdR = this.dmdR.slice();\n material.cmpR = this.cmpR.slice();\n material.exp = this.exp.slice().map(e => {\n return {\n ind: e.ind,\n city: e.city,\n amt: e.amt\n };\n });\n return material;\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Material\", this);\n } // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Material, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Material = Material;\n\n//# sourceURL=webpack:///./src/Corporation/Material.ts?"); /***/ }), -/* 131 */ +/* 132 */ /*!***************************************!*\ !*** ./src/Message/MessageHelpers.js ***! \***************************************/ @@ -1207,10 +1208,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Messages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkForMessagesToSend; });\n/* unused harmony export sendMessage */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return showMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initMessages; });\n/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Message */ 97);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n //Sends message to player, including a pop up\n\nfunction sendMessage(msg, forced = false) {\n msg.recvd = true;\n\n if (forced || !_Settings_Settings__WEBPACK_IMPORTED_MODULE_8__[/* Settings */ \"a\"].SuppressMessages) {\n showMessage(msg);\n }\n\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg) {\n var txt = \"Message received from unknown sender:

\" + \"\" + msg.msg + \"

\" + \"This message was saved as \" + msg.filename + \" onto your home computer.\";\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(txt);\n} //Adds a message to a server\n\n\nfunction addMessageToServer(msg, serverHostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* GetServerByHostname */ \"a\"])(serverHostname);\n\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (server.messages[i].filename === msg.filename) {\n return; //Already exists\n }\n }\n\n server.messages.push(msg);\n} //Checks if any of the 'timed' messages should be sent\n\n\nfunction checkForMessagesToSend() {\n var jumper0 = Messages[MessageFilenames.Jumper0];\n var jumper1 = Messages[MessageFilenames.Jumper1];\n var jumper2 = Messages[MessageFilenames.Jumper2];\n var jumper3 = Messages[MessageFilenames.Jumper3];\n var jumper4 = Messages[MessageFilenames.Jumper4];\n var cybersecTest = Messages[MessageFilenames.CyberSecTest];\n var nitesecTest = Messages[MessageFilenames.NiteSecTest];\n var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n var redpill = Messages[MessageFilenames.RedPill];\n var redpillOwned = false;\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].sourceFiles.length === 0 && !_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 25) {\n sendMessage(jumper0);\n const flightName = _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__[/* Programs */ \"a\"].Flight.name;\n const homeComp = _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].getHomeComputer();\n\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg) {\n Messages[msg.filename] = msg;\n}\n\nlet Messages = {};\n\nfunction loadMessages(saveString) {\n Messages = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__[/* Reviver */ \"c\"]);\n}\n\nlet MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\"\n};\n\nfunction initMessages() {\n //Reset\n Messages = {}; //jump3R Messages\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper0, \"I know you can sense it. I know you're searching for it. \" + \"It's why you spend night after \" + \"night at your computer.

It's real, I've seen it. And I can \" + \"help you find it. But not right now. You're not ready yet.

\" + \"Use this program to track your progress

\" + \"The fl1ght.exe program was added to your home computer

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper1, \"Soon you will be contacted by a hacking group known as CyberSec. \" + \"They can help you with your search.

\" + \"You should join them, garner their favor, and \" + \"exploit them for their Augmentations. But do not trust them. \" + \"They are not what they seem. No one is.

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper2, \"Do not try to save the world. There is no world to save. If \" + \"you want to find the truth, worry only about yourself. Ethics and \" + \"morals will get you killed.

Watch out for a hacking group known as NiteSec.\" + \"

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper3, \"You must learn to walk before you can run. And you must \" + \"run before you can fly. Look for the black hand.

\" + \"I.I.I.I

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper4, \"To find what you are searching for, you must understand the bits. \" + \"The bits are all around us. The runners will help you.

\" + \"-jump3R\")); //Messages from hacking factions\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.CyberSecTest, \"We've been watching you. Your skills are very impressive. But you're wasting \" + \"your talents. If you join us, you can put your skills to good use and change \" + \"the world for the better. If you join us, we can unlock your full potential.

\" + \"But first, you must pass our test. Find and install the backdoor on our server.

\" + \"-CyberSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.NiteSecTest, \"People say that the corrupted governments and corporations rule the world. \" + \"Yes, maybe they do. But do you know who everyone really fears? People \" + \"like us. Because they can't hide from us. Because they can't fight shadows \" + \"and ideas with bullets.

\" + \"Join us, and people will fear you, too.

\" + \"Find and install the backdoor on our server. Then, we will contact you again.\" + \"

-NiteSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.BitRunnersTest, \"We know what you are doing. We know what drives you. We know \" + \"what you are looking for.

\" + \"We can help you find the answers.

\" + \"run4theh111z\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.RedPill, \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" + \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" + \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" + \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\"));\n}\n\n\n\n//# sourceURL=webpack:///./src/Message/MessageHelpers.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Messages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkForMessagesToSend; });\n/* unused harmony export sendMessage */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return showMessage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return loadMessages; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return initMessages; });\n/* harmony import */ var _Message__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Message */ 97);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\n\n\n\n\n\n\n //Sends message to player, including a pop up\n\nfunction sendMessage(msg, forced = false) {\n msg.recvd = true;\n\n if (forced || !_Settings_Settings__WEBPACK_IMPORTED_MODULE_8__[/* Settings */ \"a\"].SuppressMessages) {\n showMessage(msg);\n }\n\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(msg) {\n var txt = \"Message received from unknown sender:

\" + \"\" + msg.msg + \"

\" + \"This message was saved as \" + msg.filename + \" onto your home computer.\";\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(txt);\n} //Adds a message to a server\n\n\nfunction addMessageToServer(msg, serverHostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_7__[/* GetServerByHostname */ \"a\"])(serverHostname);\n\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (server.messages[i].filename === msg.filename) {\n return; //Already exists\n }\n }\n\n server.messages.push(msg);\n} //Checks if any of the 'timed' messages should be sent\n\n\nfunction checkForMessagesToSend() {\n var jumper0 = Messages[MessageFilenames.Jumper0];\n var jumper1 = Messages[MessageFilenames.Jumper1];\n var jumper2 = Messages[MessageFilenames.Jumper2];\n var jumper3 = Messages[MessageFilenames.Jumper3];\n var jumper4 = Messages[MessageFilenames.Jumper4];\n var cybersecTest = Messages[MessageFilenames.CyberSecTest];\n var nitesecTest = Messages[MessageFilenames.NiteSecTest];\n var bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n var redpill = Messages[MessageFilenames.RedPill];\n var redpillOwned = false;\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].sourceFiles.length === 0 && !_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!_RedPill__WEBPACK_IMPORTED_MODULE_6__[/* redPillFlag */ \"b\"] && !_Missions__WEBPACK_IMPORTED_MODULE_4__[/* inMission */ \"c\"]) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 25) {\n sendMessage(jumper0);\n const flightName = _Programs_Programs__WEBPACK_IMPORTED_MODULE_3__[/* Programs */ \"a\"].Flight.name;\n const homeComp = _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].getHomeComputer();\n\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && _Player__WEBPACK_IMPORTED_MODULE_5__[/* Player */ \"a\"].hacking_skill >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg) {\n Messages[msg.filename] = msg;\n}\n\nlet Messages = {};\n\nfunction loadMessages(saveString) {\n Messages = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_10__[/* Reviver */ \"c\"]);\n}\n\nlet MessageFilenames = {\n Jumper0: \"j0.msg\",\n Jumper1: \"j1.msg\",\n Jumper2: \"j2.msg\",\n Jumper3: \"j3.msg\",\n Jumper4: \"j4.msg\",\n CyberSecTest: \"csec-test.msg\",\n NiteSecTest: \"nitesec-test.msg\",\n BitRunnersTest: \"19dfj3l1nd.msg\",\n RedPill: \"icarus.msg\"\n};\n\nfunction initMessages() {\n //Reset\n Messages = {}; //jump3R Messages\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper0, \"I know you can sense it. I know you're searching for it. \" + \"It's why you spend night after \" + \"night at your computer.

It's real, I've seen it. And I can \" + \"help you find it. But not right now. You're not ready yet.

\" + \"Use this program to track your progress

\" + \"The fl1ght.exe program was added to your home computer

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper1, \"Soon you will be contacted by a hacking group known as CyberSec. \" + \"They can help you with your search.

\" + \"You should join them, garner their favor, and \" + \"exploit them for their Augmentations. But do not trust them. \" + \"They are not what they seem. No one is.

\" + \"-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper2, \"Do not try to save the world. There is no world to save. If \" + \"you want to find the truth, worry only about yourself. Ethics and \" + \"morals will get you killed.

Watch out for a hacking group known as NiteSec.\" + \"

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper3, \"You must learn to walk before you can run. And you must \" + \"run before you can fly. Look for the black hand.

\" + \"I.I.I.I

-jump3R\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.Jumper4, \"To find what you are searching for, you must understand the bits. \" + \"The bits are all around us. The runners will help you.

\" + \"-jump3R\")); //Messages from hacking factions\n\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.CyberSecTest, \"We've been watching you. Your skills are very impressive. But you're wasting \" + \"your talents. If you join us, you can put your skills to good use and change \" + \"the world for the better. If you join us, we can unlock your full potential.

\" + \"But first, you must pass our test. Find and install the backdoor on our server.

\" + \"-CyberSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.NiteSecTest, \"People say that the corrupted governments and corporations rule the world. \" + \"Yes, maybe they do. But do you know who everyone really fears? People \" + \"like us. Because they can't hide from us. Because they can't fight shadows \" + \"and ideas with bullets.

\" + \"Join us, and people will fear you, too.

\" + \"Find and install the backdoor on our server. Then, we will contact you again.\" + \"

-NiteSec\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.BitRunnersTest, \"We know what you are doing. We know what drives you. We know \" + \"what you are looking for.

\" + \"We can help you find the answers.

\" + \"run4theh111z\"));\n AddToAllMessages(new _Message__WEBPACK_IMPORTED_MODULE_0__[/* Message */ \"a\"](MessageFilenames.RedPill, \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" + \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" + \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" + \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\"));\n}\n\n\n\n//# sourceURL=webpack:///./src/Message/MessageHelpers.js?"); /***/ }), -/* 132 */, /* 133 */, /* 134 */, /* 135 */ @@ -1222,7 +1222,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Faction; });\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FactionInfo */ 429);\n/* harmony import */ var _formulas_favor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/favor */ 467);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\nclass Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n\n /**\n * Amount of favor the player has with this faction.\n */\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n\n /**\n * Name of faction\n */\n\n /**\n * Amount of reputation player has with this faction\n */\n\n /**\n * Reputation from the last \"prestige\" that was not converted to favor.\n * This reputation rolls over and is used for the next favor calculation\n */\n constructor(name = \"\") {\n _defineProperty(this, \"alreadyInvited\", false);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"favor\", 0);\n\n _defineProperty(this, \"isBanned\", false);\n\n _defineProperty(this, \"isMember\", false);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"playerReputation\", 0);\n\n _defineProperty(this, \"rolloverRep\", 0);\n\n this.name = name;\n }\n\n getInfo() {\n const info = _FactionInfo__WEBPACK_IMPORTED_MODULE_0__[/* FactionInfos */ \"a\"][this.name];\n\n if (info == null) {\n throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);\n }\n\n return info;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length !== 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n } //Returns an array with [How much favor would be gained, how much rep would be left over]\n\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const storedRep = Math.max(0, Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(this.favor - 1));\n const totalRep = storedRep + this.rolloverRep + this.playerReputation;\n const newFavor = Math.floor(Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* repToFavor */ \"b\"])(totalRep));\n const newRep = Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(newFavor);\n return [newFavor - this.favor + 1, totalRep - newRep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Faction\", this);\n }\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Faction, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Faction = Faction;\n\n//# sourceURL=webpack:///./src/Faction/Faction.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Faction; });\n/* harmony import */ var _FactionInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FactionInfo */ 430);\n/* harmony import */ var _formulas_favor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/favor */ 468);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\nclass Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n\n /**\n * Amount of favor the player has with this faction.\n */\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n\n /**\n * Name of faction\n */\n\n /**\n * Amount of reputation player has with this faction\n */\n\n /**\n * Reputation from the last \"prestige\" that was not converted to favor.\n * This reputation rolls over and is used for the next favor calculation\n */\n constructor(name = \"\") {\n _defineProperty(this, \"alreadyInvited\", false);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"favor\", 0);\n\n _defineProperty(this, \"isBanned\", false);\n\n _defineProperty(this, \"isMember\", false);\n\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"playerReputation\", 0);\n\n _defineProperty(this, \"rolloverRep\", 0);\n\n this.name = name;\n }\n\n getInfo() {\n const info = _FactionInfo__WEBPACK_IMPORTED_MODULE_0__[/* FactionInfos */ \"a\"][this.name];\n\n if (info == null) {\n throw new Error(`Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`);\n }\n\n return info;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length !== 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n } //Returns an array with [How much favor would be gained, how much rep would be left over]\n\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const storedRep = Math.max(0, Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(this.favor - 1));\n const totalRep = storedRep + this.rolloverRep + this.playerReputation;\n const newFavor = Math.floor(Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* repToFavor */ \"b\"])(totalRep));\n const newRep = Object(_formulas_favor__WEBPACK_IMPORTED_MODULE_1__[/* favorToRep */ \"a\"])(newFavor);\n return [newFavor - this.favor + 1, totalRep - newRep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Faction\", this);\n }\n /**\n * Initiatizes a Faction object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Faction, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Faction = Faction;\n\n//# sourceURL=webpack:///./src/Faction/Faction.ts?"); /***/ }), /* 136 */, @@ -1236,7 +1236,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Engine\", function() { return Engine; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CodingContractGenerator */ 288);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 260);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/GameRoot */ 475);\n/* harmony import */ var _ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/React/Theme */ 264);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./InteractiveTutorial */ 49);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SaveObject */ 218);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 574);\n/* harmony import */ var _Exploits_tampering__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Exploits/tampering */ 1287);\n/* harmony import */ var _Exploits_unclickable__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Exploits/unclickable */ 1288);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_38__);\n/**\n * Game engine. Handles the main game loop.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Engine = {\n // Display objects\n // TODO-Refactor this into its own component\n Display: {\n missionContent: null\n },\n indexedDb: undefined,\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n updateGame: function (numCycles = 1) {\n const time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"].process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // Working\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCycles);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCycles);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCycles);\n }\n } // Update stock prices\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCycles);\n } // Gang, if applicable\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCycles, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_18__[/* inMission */ \"c\"] && _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"]) {\n _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"].process(numCycles);\n } // Corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCycles);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCycles);\n } // Sleeves\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCycles, true);\n }\n }\n } // Counters\n\n\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters(); // Update the running time of all active scripts\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* updateOnlineScriptTimes */ \"f\"])(numCycles); // Hacknet Nodes\n\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5,\n // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000 // Generate Coding Contracts\n\n },\n decrementAllCounters: function (numCycles = 1) {\n for (var counter in Engine.Counters) {\n if (Engine.Counters.hasOwnProperty(counter)) {\n Engine.Counters[counter] = Engine.Counters[counter] - numCycles;\n }\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval == null) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval = 60;\n }\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval * 5;\n _SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* saveObject */ \"b\"].saveGame(Engine.indexedDb);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].checkForFactionInvitations();\n\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* inviteToFaction */ \"c\"])(randFaction);\n }\n\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* checkForMessagesToSend */ \"b\"])();\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n\n if (Engine.Counters.mechanicProcess <= 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n try {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_33__[/* exceptionAlert */ \"a\"])(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__[/* generateRandomContract */ \"b\"])();\n }\n\n Engine.Counters.contractGeneration = 3000;\n }\n },\n load: function (saveString) {\n // Load game from save or create new game\n if (Object(_SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* loadGame */ \"a\"])(saveString)) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])(); // Also calls Player.reapplyAllAugmentations()\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].reapplyAllSourceFiles();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* initSymbolToStockMap */ \"h\"])();\n } // Calculate the number of cycles have elapsed while offline\n\n\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n let offlineReputation = 0;\n const offlineHackingIncome = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].moneySourceA.hacking / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug * timeOffline * 0.75;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gainMoney(offlineHackingIncome); // Process offline progress\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* loadAllRunningScripts */ \"b\"])(); // This also takes care of offline production for those scripts\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = true;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCyclesOffline);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCyclesOffline);\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = false;\n } else {\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length; i++) {\n const facName = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions[i];\n if (!_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(facName)) continue;\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][facName];\n if (!faction.isMember) continue; // No rep for special factions.\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getGangName() === facName) continue;\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction); // can be infinite, doesn't matter.\n\n const reputationRate = Math.max(hRep, sRep, fRep) / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length;\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n } // Hacknet Nodes offline progress\n\n\n var offlineProductionFromHacknetNodes = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline);\n const hacknetProdInfo = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]) ? react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_30__[/* Hashes */ \"a\"])(offlineProductionFromHacknetNodes), \" hashes\") : react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineProductionFromHacknetNodes\n }); // Passive faction rep gain offline\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(numCyclesOffline); // Stock Market offline progress\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCyclesOffline);\n } // Gang progress for BitNode 2\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCyclesOffline, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Corporation offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCyclesOffline);\n } // Bladeburner offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCyclesOffline);\n } // Sleeves offline progress\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCyclesOffline, true);\n }\n }\n } // Update total playtime\n\n\n var time = numCyclesOffline * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n const timeOfflineString = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* convertTimeMsToTimeElapsedString */ \"b\"])(time);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_32__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_37___default.a.Fragment, null, \"Offline for \", timeOfflineString, \". While you were offline, your scripts generated\", \" \", react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_29__[/* Money */ \"a\"], {\n money: offlineHackingIncome\n }), \", your Hacknet Nodes generated \", hacknetProdInfo, \" and you gained\", \" \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_31__[/* Reputation */ \"a\"])(offlineReputation), \" divided amongst your factions.\"));\n } else {\n // No save found, start new game\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__[/* initSpecialServerIps */ \"c\"])();\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Engine.start(); // Run main game loop and Scripts loop\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].init();\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_22__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getHomeComputer());\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* initCompanies */ \"b\"])();\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])();\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])();\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* initMessages */ \"c\"])();\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]); // Start interactive tutorial\n\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__[/* iTutorialStart */ \"c\"])();\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_34__[/* removeLoadingScreen */ \"a\"])();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_38___default.a.render(react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__[/* TTheme */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_37___default.a.createElement(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* GameRoot */ \"a\"], {\n terminal: _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"],\n engine: this,\n player: _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]\n })), document.getElementById(\"mainmenu-container\"));\n },\n setDisplayElements: function () {\n Engine.Display.missionContent = document.getElementById(\"mission-container\");\n Engine.Display.missionContent.style.display = \"none\";\n },\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update\n\n diff = Math.floor(diff / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n\n window.requestAnimationFrame(Engine.start);\n }\n};\nvar indexedDbRequest;\n\nwindow.onload = function () {\n if (!window.indexedDB) {\n return Engine.load(null); // Will try to load from localstorage\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n */\n\n\n indexedDbRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n indexedDbRequest.onerror = function (e) {\n console.error(\"Error opening indexedDB: \");\n console.error(e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n indexedDbRequest.onsuccess = function (e) {\n Engine.indexedDb = e.target.result;\n var transaction = Engine.indexedDb.transaction([\"savestring\"]);\n var objectStore = transaction.objectStore(\"savestring\");\n var request = objectStore.get(\"save\");\n\n request.onerror = function (e) {\n console.error(\"Error in Database request to get savestring: \" + e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n request.onsuccess = function () {\n Engine.load(request.result);\n };\n };\n\n indexedDbRequest.onupgradeneeded = function (e) {\n const db = e.target.result;\n db.createObjectStore(\"savestring\");\n };\n};\n\n\n\n//# sourceURL=webpack:///./src/engine.jsx?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Engine\", function() { return Engine; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CodingContractGenerator */ 289);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Corporation/Corporation */ 261);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ui/GameRoot */ 254);\n/* harmony import */ var _ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ui/React/Theme */ 265);\n/* harmony import */ var _PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PersonObjects/formulas/reputation */ 188);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./InteractiveTutorial */ 49);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Missions */ 119);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SaveObject */ 219);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./ui/React/Reputation */ 76);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../utils/uiHelpers/removeLoadingScreen */ 574);\n/* harmony import */ var _Exploits_tampering__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Exploits/tampering */ 1290);\n/* harmony import */ var _Exploits_unclickable__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./Exploits/unclickable */ 1291);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_40__);\n/**\n * Game engine. Handles the main game loop.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst Engine = {\n // Display objects\n // TODO-Refactor this into its own component\n Display: {\n missionContent: null\n },\n indexedDb: undefined,\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n updateGame: function (numCycles = 1) {\n const time = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"].process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // Working\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toFaction();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toTerminal();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_29__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_30__[/* LocationName */ \"a\"].Slums]);\n }\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n } else {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCycles)) {\n _ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"].toCity();\n }\n }\n } // Update stock prices\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCycles);\n } // Gang, if applicable\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCycles, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_18__[/* inMission */ \"c\"] && _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"]) {\n _Missions__WEBPACK_IMPORTED_MODULE_18__[/* currMission */ \"b\"].process(numCycles);\n } // Corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCycles);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCycles);\n } // Sleeves\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCycles, true);\n }\n }\n } // Counters\n\n\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters(); // Update the running time of all active scripts\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* updateOnlineScriptTimes */ \"f\"])(numCycles); // Hacknet Nodes\n\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCycles);\n },\n\n /**\n * Counters for the main event loop. Represent the number of game cycles that\n * are required for something to happen. These counters are in game cycles,\n * which is once every 200ms\n */\n Counters: {\n autoSaveCounter: 300,\n updateSkillLevelsCounter: 10,\n updateDisplays: 3,\n updateDisplaysLong: 15,\n updateActiveScriptsDisplay: 5,\n createProgramNotifications: 10,\n augmentationsNotifications: 10,\n checkFactionInvitations: 100,\n passiveFactionGrowth: 5,\n messages: 150,\n mechanicProcess: 5,\n // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000 // Generate Coding Contracts\n\n },\n decrementAllCounters: function (numCycles = 1) {\n for (var counter in Engine.Counters) {\n if (Engine.Counters.hasOwnProperty(counter)) {\n Engine.Counters[counter] = Engine.Counters[counter] - numCycles;\n }\n }\n },\n\n /**\n * Checks if any counters are 0. If they are, executes whatever\n * is necessary and then resets the counter\n */\n checkCounters: function () {\n if (Engine.Counters.autoSaveCounter <= 0) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval == null) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval = 60;\n }\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval === 0) {\n Engine.Counters.autoSaveCounter = Infinity;\n } else {\n Engine.Counters.autoSaveCounter = _Settings_Settings__WEBPACK_IMPORTED_MODULE_23__[/* Settings */ \"a\"].AutosaveInterval * 5;\n _SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* saveObject */ \"b\"].saveGame(Engine.indexedDb);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].checkForFactionInvitations();\n\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* inviteToFaction */ \"c\"])(randFaction);\n }\n\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n var adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* checkForMessagesToSend */ \"b\"])();\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n\n if (Engine.Counters.mechanicProcess <= 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n try {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.process(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* Router */ \"b\"], _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_35__[/* exceptionAlert */ \"a\"])(\"Exception caught in Bladeburner.process(): \" + e);\n }\n }\n\n Engine.Counters.mechanicProcess = 5;\n }\n\n if (Engine.Counters.contractGeneration <= 0) {\n // X% chance of a contract being generated\n if (Math.random() <= 0.25) {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_6__[/* generateRandomContract */ \"b\"])();\n }\n\n Engine.Counters.contractGeneration = 3000;\n }\n },\n load: function (saveString) {\n // Load game from save or create new game\n if (Object(_SaveObject__WEBPACK_IMPORTED_MODULE_21__[/* loadGame */ \"a\"])(saveString)) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])(); // Also calls Player.reapplyAllAugmentations()\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].reapplyAllSourceFiles();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* initSymbolToStockMap */ \"h\"])();\n } // Calculate the number of cycles have elapsed while offline\n\n\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n let offlineReputation = 0;\n const offlineHackingIncome = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].moneySourceA.hacking / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug * timeOffline * 0.75;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gainMoney(offlineHackingIncome); // Process offline progress\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_19__[/* loadAllRunningScripts */ \"b\"])(); // This also takes care of offline production for those scripts\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].isWorking) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].focus = true;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workForFaction(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].createProgramWork(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].takeClass(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCrime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].commitCrime(numCyclesOffline);\n } else if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workType == _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].workPartTime(numCyclesOffline);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length; i++) {\n const facName = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions[i];\n if (!_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(facName)) continue;\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][facName];\n if (!faction.isMember) continue; // No rep for special factions.\n\n const info = faction.getInfo();\n if (!info.offersWork()) continue; // No rep for gangs.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getGangName() === facName) continue;\n const hRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getHackingWorkRepGain */ \"c\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const sRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionSecurityWorkRepGain */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction);\n const fRep = Object(_PersonObjects_formulas_reputation__WEBPACK_IMPORTED_MODULE_14__[/* getFactionFieldWorkRepGain */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], faction); // can be infinite, doesn't matter.\n\n const reputationRate = Math.max(hRep, sRep, fRep) / _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].factions.length;\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n } // Hacknet Nodes offline progress\n\n\n var offlineProductionFromHacknetNodes = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* processHacknetEarnings */ \"i\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline);\n const hacknetProdInfo = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_15__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]) ? react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_39___default.a.Fragment, null, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_32__[/* Hashes */ \"a\"])(offlineProductionFromHacknetNodes), \" hashes\") : react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_31__[/* Money */ \"a\"], {\n money: offlineProductionFromHacknetNodes\n }); // Passive faction rep gain offline\n\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* processPassiveFactionRepGain */ \"e\"])(numCyclesOffline); // Stock Market offline progress\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_26__[/* processStockPrices */ \"k\"])(numCyclesOffline);\n } // Gang progress for BitNode 2\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].inGang()) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].gang.process(numCyclesOffline, _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n } // Corporation offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_8__[/* Corporation */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].corporation.storeCycles(numCyclesOffline);\n } // Bladeburner offline progress\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_5__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].bladeburner.storeCycles(numCyclesOffline);\n } // Sleeves offline progress\n\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_28__[/* Sleeve */ \"a\"]) {\n const expForOtherSleeves = _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[i].process(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], numCyclesOffline); // This sleeve earns experience for other sleeves\n\n if (expForOtherSleeves == null) {\n continue;\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].sleeves[j].gainExperience(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"], expForOtherSleeves, numCyclesOffline, true);\n }\n }\n } // Update total playtime\n\n\n var time = numCyclesOffline * _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug = 0;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode == null) {\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode = 0;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].totalPlaytime += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastAug += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].playtimeSinceLastBitnode += time;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__[/* removeLoadingScreen */ \"a\"])();\n const timeOfflineString = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* convertTimeMsToTimeElapsedString */ \"b\"])(time);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_34__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_39___default.a.Fragment, null, \"Offline for \", timeOfflineString, \". While you were offline, your scripts generated\", \" \", react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_31__[/* Money */ \"a\"], {\n money: offlineHackingIncome\n }), \", your Hacknet Nodes generated \", hacknetProdInfo, \" and you gained\", \" \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_33__[/* Reputation */ \"a\"])(offlineReputation), \" divided amongst your factions.\"));\n } else {\n // No save found, start new game\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_4__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_25__[/* initSpecialServerIps */ \"c\"])();\n Engine.setDisplayElements(); // Sets variables for important DOM elements\n\n Engine.start(); // Run main game loop and Scripts loop\n\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].init();\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_22__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].getHomeComputer());\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* initCompanies */ \"b\"])();\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])();\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* initAugmentations */ \"c\"])();\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_17__[/* initMessages */ \"c\"])();\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_24__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]); // Start interactive tutorial\n\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_16__[/* iTutorialStart */ \"c\"])();\n Object(_utils_uiHelpers_removeLoadingScreen__WEBPACK_IMPORTED_MODULE_36__[/* removeLoadingScreen */ \"a\"])();\n }\n\n react_dom__WEBPACK_IMPORTED_MODULE_40___default.a.render(react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_React_Theme__WEBPACK_IMPORTED_MODULE_13__[/* TTheme */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_39___default.a.createElement(_ui_GameRoot__WEBPACK_IMPORTED_MODULE_12__[/* GameRoot */ \"a\"], {\n terminal: _Terminal__WEBPACK_IMPORTED_MODULE_27__[/* Terminal */ \"a\"],\n engine: this,\n player: _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"]\n })), document.getElementById(\"mainmenu-container\"));\n },\n setDisplayElements: function () {\n Engine.Display.missionContent = document.getElementById(\"mission-container\");\n Engine.Display.missionContent.style.display = \"none\";\n },\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed; // Divide this by cycle time to determine how many cycles have elapsed since last update\n\n diff = Math.floor(diff / _Constants__WEBPACK_IMPORTED_MODULE_9__[/* CONSTANTS */ \"a\"]._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n _Player__WEBPACK_IMPORTED_MODULE_20__[/* Player */ \"a\"].lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n\n window.requestAnimationFrame(Engine.start);\n }\n};\nvar indexedDbRequest;\n\nwindow.onload = function () {\n if (!window.indexedDB) {\n return Engine.load(null); // Will try to load from localstorage\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n */\n\n\n indexedDbRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n indexedDbRequest.onerror = function (e) {\n console.error(\"Error opening indexedDB: \");\n console.error(e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n indexedDbRequest.onsuccess = function (e) {\n Engine.indexedDb = e.target.result;\n var transaction = Engine.indexedDb.transaction([\"savestring\"]);\n var objectStore = transaction.objectStore(\"savestring\");\n var request = objectStore.get(\"save\");\n\n request.onerror = function (e) {\n console.error(\"Error in Database request to get savestring: \" + e);\n return Engine.load(null); // Try to load from localstorage\n };\n\n request.onsuccess = function () {\n Engine.load(request.result);\n };\n };\n\n indexedDbRequest.onupgradeneeded = function (e) {\n const db = e.target.result;\n db.createObjectStore(\"savestring\");\n };\n};\n\n\n\n//# sourceURL=webpack:///./src/engine.jsx?"); /***/ }), /* 139 */, @@ -1291,7 +1291,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameTimer; });\n/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/material/LinearProgress */ 1380);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/withStyles */ 1378);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n\n\n\n\nconst TimerProgress = Object(_mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(() => ({\n bar: {\n transition: \"none\",\n backgroundColor: \"#adff2f\"\n }\n}))(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\nfunction GameTimer(props) {\n const [v, setV] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(100);\n const tick = 200;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(() => {\n const intervalId = setInterval(() => {\n setV(old => {\n if (old <= 0) props.onExpire();\n return old - tick / props.millis * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []); // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(TimerProgress, {\n variant: \"determinate\",\n value: v\n }));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/GameTimer.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameTimer; });\n/* harmony import */ var _mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/material/LinearProgress */ 1383);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/withStyles */ 1381);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\n\n\nconst TimerProgress = Object(_mui_styles_withStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(() => ({\n bar: {\n transition: \"none\",\n backgroundColor: \"#adff2f\"\n }\n}))(_mui_material_LinearProgress__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\nfunction GameTimer(props) {\n const [v, setV] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(100);\n const tick = 200;\n Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useEffect\"])(() => {\n const intervalId = setInterval(() => {\n setV(old => {\n if (old <= 0) props.onExpire();\n return old - tick / props.millis * 100;\n });\n }, tick);\n return () => {\n clearInterval(intervalId);\n };\n }, []); // https://stackoverflow.com/questions/55593367/disable-material-uis-linearprogress-animation\n // TODO(hydroflame): there's like a bug where it triggers the end before the\n // bar physically reaches the end\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(TimerProgress, {\n variant: \"determinate\",\n value: v\n }));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/GameTimer.tsx?"); /***/ }), /* 150 */ @@ -1340,7 +1340,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrades; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 119);\n/* harmony import */ var _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberUpgrade */ 703);\n\n\nconst GangMemberUpgrades = {};\n\n(function () {\n _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberUpgradesMetadata */ \"b\"].forEach(e => {\n GangMemberUpgrades[e.name] = new _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberUpgrade */ \"a\"](e.name, e.cost, e.upgType, e.mults);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrades.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrades; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 120);\n/* harmony import */ var _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberUpgrade */ 703);\n\n\nconst GangMemberUpgrades = {};\n\n(function () {\n _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberUpgradesMetadata */ \"b\"].forEach(e => {\n GangMemberUpgrades[e.name] = new _GangMemberUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberUpgrade */ \"a\"](e.name, e.cost, e.upgType, e.mults);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrades.ts?"); /***/ }), /* 155 */ @@ -1364,7 +1364,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getBuyTransactionCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getSellTransactionGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return processTransactionForecastMovement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateBuyMaxAmount; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/**\n * Stock Market Helper Functions\n */\n\n\n // Amount by which a stock's forecast changes during each price movement\n\nconst forecastChangePerPriceMovement = 0.006;\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\n\nfunction getBuyTransactionCost(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long; // If the number of shares doesn't trigger a price movement, its a simple calculation\n\n if (isLong) {\n return shares * stock.getAskPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n }\n}\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\n\nfunction getSellTransactionGain(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n\n if (isLong) {\n return shares * stock.getBidPrice() - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n return origCost + profit;\n }\n}\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\n\nfunction processTransactionForecastMovement(stock, shares) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares); // If there's only going to be one iteration at most\n\n const firstShares = stock.shareTxUntilMovement;\n\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n } // Calculate how many iterations of price changes we need to account for\n\n\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement); // If on the offchance we end up perfectly at the next price movement\n\n stock.shareTxUntilMovement = stock.shareTxForMovement - (shares - stock.shareTxUntilMovement) % stock.shareTxForMovement;\n\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n } // Forecast always decreases in magnitude\n\n\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\n\nfunction calculateBuyMaxAmount(stock, posType, money) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return 0;\n }\n\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n const remainingMoney = money - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n return Math.floor(remainingMoney / currPrice);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketHelpers.ts?"); +eval("/* unused harmony export forecastChangePerPriceMovement */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getBuyTransactionCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getSellTransactionGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return processTransactionForecastMovement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateBuyMaxAmount; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/**\n * Stock Market Helper Functions\n */\n\n\n // Amount by which a stock's forecast changes during each price movement\n\nconst forecastChangePerPriceMovement = 0.006;\n/**\n * Calculate the total cost of a \"buy\" transaction. This accounts for spread and commission.\n * @param {Stock} stock - Stock being purchased\n * @param {number} shares - Number of shares being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Total transaction cost. Returns null for an invalid transaction\n */\n\nfunction getBuyTransactionCost(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long; // If the number of shares doesn't trigger a price movement, its a simple calculation\n\n if (isLong) {\n return shares * stock.getAskPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n }\n}\n/**\n * Calculate the TOTAL amount of money gained from a sale (NOT net profit). This accounts\n * for spread and commission.\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n * @returns {number | null} Amount of money gained from transaction. Returns null for an invalid transaction\n */\n\nfunction getSellTransactionGain(stock, shares, posType) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return null;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares);\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n\n if (isLong) {\n return shares * stock.getBidPrice() - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n } else {\n // Calculating gains for a short position requires calculating the profit made\n const origCost = shares * stock.playerAvgShortPx;\n const profit = (stock.playerAvgShortPx - stock.getAskPrice()) * shares - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n return origCost + profit;\n }\n}\n/**\n * Processes a stock's change in forecast & second-order forecast\n * whenever it is transacted\n * @param {Stock} stock - Stock being sold\n * @param {number} shares - Number of sharse being transacted\n * @param {PositionTypes} posType - Long or short position\n */\n\nfunction processTransactionForecastMovement(stock, shares) {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n } // Cap the 'shares' arg at the stock's maximum shares. This'll prevent\n // hanging in the case when a really big number is passed in\n\n\n shares = Math.min(shares, stock.maxShares); // If there's only going to be one iteration at most\n\n const firstShares = stock.shareTxUntilMovement;\n\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\n\n if (stock.shareTxUntilMovement <= 0) {\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n stock.influenceForecast(forecastChangePerPriceMovement);\n stock.influenceForecastForecast(forecastChangePerPriceMovement * (stock.mv / 100));\n }\n\n return;\n } // Calculate how many iterations of price changes we need to account for\n\n\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement); // If on the offchance we end up perfectly at the next price movement\n\n stock.shareTxUntilMovement = stock.shareTxForMovement - (shares - stock.shareTxUntilMovement) % stock.shareTxForMovement;\n\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n } // Forecast always decreases in magnitude\n\n\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\n/**\n * Calculate the maximum number of shares of a stock that can be purchased.\n * Handles mid-transaction price movements, both L and S positions, etc.\n * Used for the \"Buy Max\" button in the UI\n * @param {Stock} stock - Stock being purchased\n * @param {PositionTypes} posType - Long or short position\n * @param {number} money - Amount of money player has\n * @returns maximum number of shares that the player can purchase\n */\n\nfunction calculateBuyMaxAmount(stock, posType, money) {\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return 0;\n }\n\n const isLong = posType === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long;\n const remainingMoney = money - _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n return Math.floor(remainingMoney / currPrice);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketHelpers.ts?"); /***/ }), /* 157 */ @@ -1388,7 +1388,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTaskTracker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Person; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/skill */ 198);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formulas/intelligence */ 310);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Base class representing a person-like object\n\n\n\n\n // Interface that defines a generic object used to track experience/money\n// earnings for tasks\n\nfunction createTaskTracker() {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0\n };\n}\nclass Person {\n constructor() {\n _defineProperty(this, \"hacking_skill\", 1);\n\n _defineProperty(this, \"strength\", 1);\n\n _defineProperty(this, \"defense\", 1);\n\n _defineProperty(this, \"dexterity\", 1);\n\n _defineProperty(this, \"agility\", 1);\n\n _defineProperty(this, \"charisma\", 1);\n\n _defineProperty(this, \"intelligence\", 1);\n\n _defineProperty(this, \"hp\", 10);\n\n _defineProperty(this, \"max_hp\", 10);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n _defineProperty(this, \"hacking_mult\", 1);\n\n _defineProperty(this, \"strength_mult\", 1);\n\n _defineProperty(this, \"defense_mult\", 1);\n\n _defineProperty(this, \"dexterity_mult\", 1);\n\n _defineProperty(this, \"agility_mult\", 1);\n\n _defineProperty(this, \"charisma_mult\", 1);\n\n _defineProperty(this, \"hacking_exp_mult\", 1);\n\n _defineProperty(this, \"strength_exp_mult\", 1);\n\n _defineProperty(this, \"defense_exp_mult\", 1);\n\n _defineProperty(this, \"dexterity_exp_mult\", 1);\n\n _defineProperty(this, \"agility_exp_mult\", 1);\n\n _defineProperty(this, \"charisma_exp_mult\", 1);\n\n _defineProperty(this, \"hacking_chance_mult\", 1);\n\n _defineProperty(this, \"hacking_speed_mult\", 1);\n\n _defineProperty(this, \"hacking_money_mult\", 1);\n\n _defineProperty(this, \"hacking_grow_mult\", 1);\n\n _defineProperty(this, \"company_rep_mult\", 1);\n\n _defineProperty(this, \"faction_rep_mult\", 1);\n\n _defineProperty(this, \"crime_money_mult\", 1);\n\n _defineProperty(this, \"crime_success_mult\", 1);\n\n _defineProperty(this, \"work_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_purchase_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_ram_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_core_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_level_cost_mult\", 1);\n\n _defineProperty(this, \"bladeburner_max_stamina_mult\", 1);\n\n _defineProperty(this, \"bladeburner_stamina_gain_mult\", 1);\n\n _defineProperty(this, \"bladeburner_analysis_mult\", 1);\n\n _defineProperty(this, \"bladeburner_success_chance_mult\", 1);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"queuedAugmentations\", []);\n\n _defineProperty(this, \"city\", _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12);\n }\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug) {\n for (const mult in aug.mults) {\n if (this[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n this[mult] *= aug.mults[mult];\n }\n }\n }\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n\n\n calculateStat(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_3__[/* calculateSkill */ \"b\"])(exp, mult);\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n\n\n getFactionFieldWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.charisma / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 5.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n\n\n getFactionHackingWorkRepGain() {\n return this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n\n\n getFactionSecurityWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 4.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Reset all multipliers to 1\n */\n\n\n resetMultipliers() {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.work_money_mult = 1;\n }\n /**\n * Update all stat levels\n */\n\n\n updateStatLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateStat(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateStat(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateStat(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Person.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTaskTracker; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Person; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./formulas/skill */ 199);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./formulas/intelligence */ 312);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Base class representing a person-like object\n\n\n\n\n // Interface that defines a generic object used to track experience/money\n// earnings for tasks\n\nfunction createTaskTracker() {\n return {\n hack: 0,\n str: 0,\n def: 0,\n dex: 0,\n agi: 0,\n cha: 0,\n money: 0\n };\n}\nclass Person {\n constructor() {\n _defineProperty(this, \"hacking_skill\", 1);\n\n _defineProperty(this, \"strength\", 1);\n\n _defineProperty(this, \"defense\", 1);\n\n _defineProperty(this, \"dexterity\", 1);\n\n _defineProperty(this, \"agility\", 1);\n\n _defineProperty(this, \"charisma\", 1);\n\n _defineProperty(this, \"intelligence\", 1);\n\n _defineProperty(this, \"hp\", 10);\n\n _defineProperty(this, \"max_hp\", 10);\n\n _defineProperty(this, \"hacking_exp\", 0);\n\n _defineProperty(this, \"strength_exp\", 0);\n\n _defineProperty(this, \"defense_exp\", 0);\n\n _defineProperty(this, \"dexterity_exp\", 0);\n\n _defineProperty(this, \"agility_exp\", 0);\n\n _defineProperty(this, \"charisma_exp\", 0);\n\n _defineProperty(this, \"intelligence_exp\", 0);\n\n _defineProperty(this, \"hacking_mult\", 1);\n\n _defineProperty(this, \"strength_mult\", 1);\n\n _defineProperty(this, \"defense_mult\", 1);\n\n _defineProperty(this, \"dexterity_mult\", 1);\n\n _defineProperty(this, \"agility_mult\", 1);\n\n _defineProperty(this, \"charisma_mult\", 1);\n\n _defineProperty(this, \"hacking_exp_mult\", 1);\n\n _defineProperty(this, \"strength_exp_mult\", 1);\n\n _defineProperty(this, \"defense_exp_mult\", 1);\n\n _defineProperty(this, \"dexterity_exp_mult\", 1);\n\n _defineProperty(this, \"agility_exp_mult\", 1);\n\n _defineProperty(this, \"charisma_exp_mult\", 1);\n\n _defineProperty(this, \"hacking_chance_mult\", 1);\n\n _defineProperty(this, \"hacking_speed_mult\", 1);\n\n _defineProperty(this, \"hacking_money_mult\", 1);\n\n _defineProperty(this, \"hacking_grow_mult\", 1);\n\n _defineProperty(this, \"company_rep_mult\", 1);\n\n _defineProperty(this, \"faction_rep_mult\", 1);\n\n _defineProperty(this, \"crime_money_mult\", 1);\n\n _defineProperty(this, \"crime_success_mult\", 1);\n\n _defineProperty(this, \"work_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_money_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_purchase_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_ram_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_core_cost_mult\", 1);\n\n _defineProperty(this, \"hacknet_node_level_cost_mult\", 1);\n\n _defineProperty(this, \"bladeburner_max_stamina_mult\", 1);\n\n _defineProperty(this, \"bladeburner_stamina_gain_mult\", 1);\n\n _defineProperty(this, \"bladeburner_analysis_mult\", 1);\n\n _defineProperty(this, \"bladeburner_success_chance_mult\", 1);\n\n _defineProperty(this, \"augmentations\", []);\n\n _defineProperty(this, \"queuedAugmentations\", []);\n\n _defineProperty(this, \"city\", _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12);\n }\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug) {\n for (const mult in aug.mults) {\n if (this[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n this[mult] *= aug.mults[mult];\n }\n }\n }\n /**\n * Given an experience amount and stat multiplier, calculates the\n * stat level. Stat-agnostic (same formula for every stat)\n */\n\n\n calculateStat(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_3__[/* calculateSkill */ \"b\"])(exp, mult);\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n\n\n getFactionFieldWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.charisma / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 5.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n\n\n getFactionHackingWorkRepGain() {\n return this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult;\n }\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n\n\n getFactionSecurityWorkRepGain() {\n const t = 0.9 * (this.hacking_skill / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.strength / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.defense / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.dexterity / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel + this.agility / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MaxSkillLevel) / 4.5;\n return t * this.faction_rep_mult;\n }\n /**\n * Reset all multipliers to 1\n */\n\n\n resetMultipliers() {\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.work_money_mult = 1;\n }\n /**\n * Update all stat levels\n */\n\n\n updateStatLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateStat(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateStat(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateStat(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n const ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n }\n\n getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_4__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Person.ts?"); /***/ }), /* 159 */, @@ -1445,7 +1445,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ActionIdentifier */ 191);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/ActionTypes */ 33);\n/* harmony import */ var _data_Growths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Growths */ 520);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOperations */ 199);\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BlackOperation */ 99);\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Operation */ 262);\n/* harmony import */ var _Contract__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Contract */ 468);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GeneralActions */ 200);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Skills */ 189);\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./City */ 320);\n/* harmony import */ var _data_Help__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./data/Help */ 469);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Hospital/Hospital */ 308);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 438);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Bladeburner {\n constructor(player) {\n _defineProperty(this, \"numHosp\", 0);\n\n _defineProperty(this, \"moneyLost\", 0);\n\n _defineProperty(this, \"rank\", 0);\n\n _defineProperty(this, \"maxRank\", 0);\n\n _defineProperty(this, \"skillPoints\", 0);\n\n _defineProperty(this, \"totalSkillPoints\", 0);\n\n _defineProperty(this, \"teamSize\", 0);\n\n _defineProperty(this, \"teamLost\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"randomEventCounter\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600));\n\n _defineProperty(this, \"actionTimeToComplete\", 0);\n\n _defineProperty(this, \"actionTimeCurrent\", 0);\n\n _defineProperty(this, \"actionTimeOverflow\", 0);\n\n _defineProperty(this, \"action\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"cities\", {});\n\n _defineProperty(this, \"city\", _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[2]);\n\n _defineProperty(this, \"skills\", {});\n\n _defineProperty(this, \"skillMultipliers\", {});\n\n _defineProperty(this, \"staminaBonus\", 0);\n\n _defineProperty(this, \"maxStamina\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"contracts\", {});\n\n _defineProperty(this, \"operations\", {});\n\n _defineProperty(this, \"blackops\", {});\n\n _defineProperty(this, \"logging\", {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true\n });\n\n _defineProperty(this, \"automateEnabled\", false);\n\n _defineProperty(this, \"automateActionHigh\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshHigh\", 0);\n\n _defineProperty(this, \"automateActionLow\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshLow\", 0);\n\n _defineProperty(this, \"consoleHistory\", []);\n\n _defineProperty(this, \"consoleLogs\", [\"Bladeburner Console\", \"Type 'help' to see console commands\"]);\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames.length; ++i) {\n this.cities[_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]] = new _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"](_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity() {\n const city = this.cities[this.city];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n\n return city;\n }\n\n calculateStaminaPenalty() {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player, actionId) {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n if (actionId.name === \"Raid\" && this.getCurrentCity().commsEst === 0) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n this.actionTimeToComplete = 60;\n break;\n\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill) {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player, commands) {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n }\n\n postToConsole(input, saveToLogs = true) {\n const MaxConsoleEntries = 100;\n\n if (saveToLogs) {\n this.consoleLogs.push(input);\n\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input) {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__[/* getTimestamp */ \"a\"])()}] ${input}`);\n }\n\n resetAction() {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Idle\n });\n }\n\n clearConsole() {\n this.consoleLogs.length = 0;\n }\n\n prestige() {\n this.resetAction();\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0) {\n this.storedCycles += numCycles;\n } // working on\n\n\n getActionIdFromTypeAndName(type = \"\", name = \"\") {\n if (type === \"\" || name === \"\") {\n return null;\n }\n\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"];\n\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"];\n\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"];\n action.name = \"Training\";\n break;\n\n case \"recruitment\":\n case \"recruit\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n\n case \"diplomacy\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n\n case \"hyperbolic regeneration chamber\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n\n default:\n return null;\n }\n\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player, args) {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n\n const name = args[2];\n\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args) {\n switch (args.length) {\n case 1:\n {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n\n case 2:\n {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillNames[i]];\n let level = 0;\n\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level, 0));\n }\n\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n\n if (mult && mult !== 1) {\n mult = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(mult, 3);\n\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n case 3:\n {\n const skillName = args[2];\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null || !(skill instanceof _Skill__WEBPACK_IMPORTED_MODULE_11__[/* Skill */ \"a\"])) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const pointCost = skill.calculateCost(currentLevel);\n\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\"You do not have enough Skill Points to upgrade this. You need \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(pointCost, 0));\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n default:\n {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args) {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\");\n break;\n }\n }\n\n executeHelpConsoleCommand(args) {\n if (args.length === 1) {\n for (const line of _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"].helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"])) continue;\n const helpText = _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"][args[i]];\n\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args) {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\");\n return;\n } // Enable/Disable\n\n\n if (args.length === 2) {\n const flag = args[1];\n\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\"When your stamina drops to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshLow, 0) + \", you will automatically switch to \" + this.automateActionLow.name + \". When your stamina recovers to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshHigh, 0) + \", you will automatically \" + \"switch to \" + this.automateActionHigh.name + \".\");\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (!(this.automateActionLow instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]) || !(this.automateActionHigh instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n\n return;\n } // Set variables\n\n\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n let highLow = false; // True for high, false for low\n\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][val],\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n\n break;\n\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n\n break;\n\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command) {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n\n while (i < command.length) {\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n\n ++i;\n }\n\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n\n return args;\n }\n\n executeConsoleCommand(player, command) {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n\n case \"stop\":\n this.resetAction();\n break;\n\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName) {\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n\n const rand = Math.random();\n let percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(2, 4); // Migration increases population change\n\n --sourceCity.comms;\n ++destCity.comms;\n }\n\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName, chance) {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n\n if (chance > 1) {\n chance /= 100;\n }\n\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent() {\n const chance = Math.random(); // Choose random source/destination city for events\n\n const sourceCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"]) || !(destCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms; // Change pop\n\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\");\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a large number of Synthoids migrated from \" + sourceCityName + \" to some other city\");\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 20) / 100;\n\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } // 10% chance of nothing happening\n\n }\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n\n\n gainActionStats(player, action, success) {\n const difficulty = action.getDifficulty();\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n\n const difficultyMult = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n const unweightedGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player) {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player) {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player) {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers() {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1\n };\n }\n\n updateSkillMultipliers() {\n this.resetSkillMultipliers();\n\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n\n const level = this.skills[skillName];\n\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n } // Calculate team losses\n\n\n const teamCount = action.teamCount;\n\n if (teamCount >= 1) {\n let max;\n\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n\n break;\n\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n\n break;\n\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByCount(0.1);\n break;\n\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true\n });\n --city.comms;\n --city.commsEst;\n } else {\n const change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 5));\n break;\n\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-3, -1));\n break;\n\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-5, 5));\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId) {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n return this.contracts[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return this.operations[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Training\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Field Analysis\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Recruitment\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Diplomacy\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n\n default:\n return null;\n }\n }\n\n completeContract(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n\n const city = this.getCurrentCity();\n\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(100, 1e3));\n break;\n\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.02);\n break;\n\n case \"Retirement\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.04);\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router, player) {\n switch (this.action.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const isOperation = this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1); // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Process Contract/Operation success/failure\n\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count; // Earn money for contracts\n\n let moneyGain = 0;\n\n if (!isOperation) {\n moneyGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel);\n }\n\n if (action.rankGain) {\n const gain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, gain);\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain));\n }\n }\n\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n\n if (action.rankLoss) {\n loss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n this.hpLost += damage;\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n let logLossText = \"\";\n\n if (loss > 0) {\n logLossText += \"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(loss, 3) + \" rank. \";\n }\n\n if (damage > 0) {\n logLossText += \"Took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage.\";\n }\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n\n\n this.startAction(player, this.action); // Repeat action\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n const action = this.getActionObject(this.action);\n\n if (action == null || !(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor; // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Team loss variables\n\n\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n\n if (action.rankGain) {\n rankGain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n\n teamLossMax = Math.ceil(teamCount / 2); // Operation Daedalus\n\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n\n if (action.rankLoss) {\n rankLoss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(action.name + \" failed! Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankLoss, 1) + \" rank and took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage\");\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n // Calculate team lossses\n\n if (teamCount >= 1) {\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.blackops) {\n this.log(\"You lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n {\n this.stamina -= 0.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n\n if (this.logging.general) {\n this.log(\"Training completed. Gained: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(strExpGain, 1) + \" str exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(defExpGain, 1) + \" def exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(dexExpGain, 1) + \" dex exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(agiExpGain, 1) + \" agi exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(staminaGain, 3) + \" max stamina\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff = 0.04 * Math.pow(player.hacking_skill, 0.3) + 0.04 * Math.pow(player.intelligence, 0.9) + 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n\n if (this.logging.general) {\n this.log(\"Field analysis completed. Gained 0.1 rank, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(hackingExpGain, 1) + \" hacking exp, and \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(charismaExpGain, 1) + \" charisma exp\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const successChance = this.getRecruitmentSuccessChance(player);\n\n if (Math.random() < successChance) {\n const expGain = 2 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n\n if (this.logging.general) {\n this.log(`Diplomacy completed. Chaos levels in the current city fell by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatPercentage(1 - eff)}`);\n }\n\n this.startAction(player, this.action); // Repeat Action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n {\n player.regenerateHp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain);\n const staminaGain = this.maxStamina * (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n\n if (this.logging.general) {\n this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain} HP and gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatStamina(staminaGain)} stamina`);\n }\n\n break;\n }\n\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player, change) {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n\n this.rank += change;\n\n if (this.rank < 0) {\n this.rank = 0;\n }\n\n this.maxRank = Math.max(this.rank, this.maxRank);\n const bladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* factionExists */ \"b\"])(bladeburnersFactionName)) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][bladeburnersFactionName];\n\n if (!(bladeburnerFac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__[/* Faction */ \"a\"])) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation += _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n } // Gain skill points\n\n\n const rankNeededForSp = (this.totalSkillPoints + 1) * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint;\n\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor((this.maxRank - rankNeededForSp) / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint + 1);\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router, player, seconds) {\n if (this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) return;\n\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n\n if (!(this.action instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n } // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n\n\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].MaxStaminaToGainFactor;\n const gain = (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * player.bladeburner_max_stamina_mult;\n\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = this.maxStamina * this.stamina / oldMax;\n }\n\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create() {\n this.contracts[\"Tracking\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Tracking\",\n desc: \"Identify and locate Synthoids. This contract involves reconnaissance \" + \"and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

\" + \"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for \" + \"whatever city you are currently in.\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1\n },\n isStealth: true\n });\n this.contracts[\"Bounty Hunter\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Bounty Hunter\",\n desc: \"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

\" + \"Successfully completing a Bounty Hunter contract will lower the population in your \" + \"current city, and will also increase its chaos level.\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.contracts[\"Retirement\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Retirement\",\n desc: \"Hunt down and retire (kill) rogue Synthoids.

\" + \"Successfully completing a Retirement contract will lower the population in your current \" + \"city, and will also increase its chaos level.\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Investigation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Investigation\",\n desc: \"As a field agent, investigate and identify Synthoid \" + \"populations, movements, and operations.

Successful \" + \"Investigation ops will increase the accuracy of your \" + \"synthoid data.

\" + \"You will NOT lose HP from failed Investigation ops.\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Undercover Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Undercover Operation\",\n desc: \"Conduct undercover operations to identify hidden \" + \"and underground Synthoid communities and organizations.

\" + \"Successful Undercover ops will increase the accuracy of your synthoid \" + \"data.\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Sting Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Sting Operation\",\n desc: \"Conduct a sting operation to bait and capture particularly \" + \"notorious Synthoid criminals.\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Raid\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Raid\",\n desc: \"Lead an assault on a known Synthoid community. Note that \" + \"there must be an existing Synthoid community in your current city \" + \"in order for this Operation to be successful.\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Stealth Retirement Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Stealth Retirement Operation\",\n desc: \"Lead a covert operation to retire Synthoids. The \" + \"objective is to complete the task without \" + \"drawing any attention. Stealth and discretion are key.\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isStealth: true,\n isKill: true\n });\n this.operations[\"Assassination\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Assassination\",\n desc: \"Assassinate Synthoids that have been identified as \" + \"important, high-profile social and political leaders \" + \"in the Synthoid communities.\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8\n },\n isStealth: true,\n isKill: true\n });\n }\n\n process(router, player) {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (_RedPill__WEBPACK_IMPORTED_MODULE_23__[/* redPillFlag */ \"b\"] === false && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n } // If the Player starts doing some other actions, set action to idle and alert\n\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__[/* AugmentationNames */ \"a\"].BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_25__[/* Settings */ \"a\"].SuppressBladeburnerPopup) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(msg);\n }\n }\n\n this.resetAction();\n } // If the Player has no Stamina, set action to idle\n\n\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n } // A 'tick' for this mechanic is one second (= 5 game cycles)\n\n\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n\n this.storedCycles -= seconds * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond; // Stamina\n\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina); // Count increase for contracts/operations\n\n for (const contract of Object.values(this.contracts)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n\n for (const op of Object.values(this.operations)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n\n if (growthF !== undefined) {\n op.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n } // Chaos goes down very slowly\n\n\n for (const cityName of _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames) {\n const city = this.cities[cityName];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n } // Random Events\n\n\n this.randomEventCounter -= seconds;\n\n if (this.randomEventCounter <= 0) {\n this.randomEvent(); // Add instead of setting because we might have gone over the required time for the event\n\n this.randomEventCounter += Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600);\n }\n\n this.processAction(router, player, seconds); // Automation\n\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId) {\n const res = {\n type: \"\",\n name: \"\"\n };\n const types = Object.keys(_data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"]);\n\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][types[i]]) {\n res.type = types[i];\n break;\n }\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn() {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn() {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn() {\n return Object.keys(_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]);\n }\n\n getGeneralActionNamesNetscriptFn() {\n return Object.keys(_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"]);\n }\n\n getSkillNamesNetscriptFn() {\n return Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n }\n\n startActionNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n } // Special logic for Black Ops\n\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) throw new Error(`Action should be BlackOperation but isn't`); //const blackOp = (action as BlackOperation);\n\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n } // Can't start a BlackOp if its already been done\n\n\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", `Black Op ${actionId.name} has already been completed.`);\n return false;\n } // Can't start a BlackOp if you haven't done the one before it\n\n\n const blackops = [];\n\n for (const nm in _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n\n blackops.sort(function (a, b) {\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][a].reqdRank - _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][b].reqdRank; // Sort black ops in intended order\n });\n const i = blackops.indexOf(actionId.name);\n\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\"bladeburner.startAction\", `Preceding Black Op must be completed before starting '${actionId.name}'.`);\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getActionTime(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n return 30;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return 60;\n\n default:\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return [1, 1];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return Math.floor(actionObj.count);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return Infinity;\n\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName, workerScript) {\n const errorLogText = `Invalid skill: '${skillName}'`;\n\n if (!_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", errorLogText);\n return false;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\"bladeburner.upgradeSkill\", `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`);\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type, name, workerScript) {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type, name, size, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n workerScript.log(\"bladeburner.setTeamSize\", \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", `Invalid size: ${size}`);\n return -1;\n }\n\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", `You do not have the required rank (${this.rank}/${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction}).`);\n return false;\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Bladeburner\", this);\n }\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Bladeburner, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Bladeburner = Bladeburner;\n\n//# sourceURL=webpack:///./src/Bladeburner/Bladeburner.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ActionIdentifier */ 191);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/ActionTypes */ 33);\n/* harmony import */ var _data_Growths__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/Growths */ 520);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOperations */ 200);\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BlackOperation */ 99);\n/* harmony import */ var _Operation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Operation */ 263);\n/* harmony import */ var _Contract__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Contract */ 469);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GeneralActions */ 201);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Skills__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Skills */ 189);\n/* harmony import */ var _Skill__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Skill */ 181);\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./City */ 322);\n/* harmony import */ var _data_Help__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./data/Help */ 470);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Hospital/Hospital */ 310);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 439);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Bladeburner {\n constructor(player) {\n _defineProperty(this, \"numHosp\", 0);\n\n _defineProperty(this, \"moneyLost\", 0);\n\n _defineProperty(this, \"rank\", 0);\n\n _defineProperty(this, \"maxRank\", 0);\n\n _defineProperty(this, \"skillPoints\", 0);\n\n _defineProperty(this, \"totalSkillPoints\", 0);\n\n _defineProperty(this, \"teamSize\", 0);\n\n _defineProperty(this, \"teamLost\", 0);\n\n _defineProperty(this, \"hpLost\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"randomEventCounter\", Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600));\n\n _defineProperty(this, \"actionTimeToComplete\", 0);\n\n _defineProperty(this, \"actionTimeCurrent\", 0);\n\n _defineProperty(this, \"actionTimeOverflow\", 0);\n\n _defineProperty(this, \"action\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"cities\", {});\n\n _defineProperty(this, \"city\", _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[2]);\n\n _defineProperty(this, \"skills\", {});\n\n _defineProperty(this, \"skillMultipliers\", {});\n\n _defineProperty(this, \"staminaBonus\", 0);\n\n _defineProperty(this, \"maxStamina\", 0);\n\n _defineProperty(this, \"stamina\", 0);\n\n _defineProperty(this, \"contracts\", {});\n\n _defineProperty(this, \"operations\", {});\n\n _defineProperty(this, \"blackops\", {});\n\n _defineProperty(this, \"logging\", {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true\n });\n\n _defineProperty(this, \"automateEnabled\", false);\n\n _defineProperty(this, \"automateActionHigh\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshHigh\", 0);\n\n _defineProperty(this, \"automateActionLow\", new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]\n }));\n\n _defineProperty(this, \"automateThreshLow\", 0);\n\n _defineProperty(this, \"consoleHistory\", []);\n\n _defineProperty(this, \"consoleLogs\", [\"Bladeburner Console\", \"Type 'help' to see console commands\"]);\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames.length; ++i) {\n this.cities[_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]] = new _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"](_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity() {\n const city = this.cities[this.city];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n\n return city;\n }\n\n calculateStaminaPenalty() {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n startAction(player, actionId) {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n\n if (action.count < 1) {\n return this.resetAction();\n }\n\n if (actionId.name === \"Raid\" && this.getCurrentCity().commsEst === 0) {\n return this.resetAction();\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n this.resetAction();\n this.log(\"Error: Tried to start a Black Operation that had already been completed\");\n break;\n }\n\n const action = this.getActionObject(actionId);\n\n if (action == null) {\n throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n }\n\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n this.actionTimeToComplete = 60;\n break;\n\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n break;\n }\n }\n\n upgradeSkill(skill) {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\n }\n\n if (isNaN(this.skills[skillName]) || this.skills[skillName] < 0) {\n throw new Error(\"Level of Skill \" + skillName + \" is invalid: \" + this.skills[skillName]);\n }\n\n this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player, commands) {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n }\n\n postToConsole(input, saveToLogs = true) {\n const MaxConsoleEntries = 100;\n\n if (saveToLogs) {\n this.consoleLogs.push(input);\n\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input) {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_28__[/* getTimestamp */ \"a\"])()}] ${input}`);\n }\n\n resetAction() {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Idle\n });\n }\n\n clearConsole() {\n this.consoleLogs.length = 0;\n }\n\n prestige() {\n this.resetAction();\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0) {\n this.storedCycles += numCycles;\n } // working on\n\n\n getActionIdFromTypeAndName(type = \"\", name = \"\") {\n if (type === \"\" || name === \"\") {\n return null;\n }\n\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"];\n\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"blackoperation\":\n case \"black operation\":\n case \"black operations\":\n case \"black op\":\n case \"black ops\":\n case \"blackop\":\n case \"blackops\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"];\n\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(name)) {\n action.name = name;\n return action;\n } else {\n return null;\n }\n\n break;\n\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"];\n action.name = \"Training\";\n break;\n\n case \"recruitment\":\n case \"recruit\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n\n case \"diplomacy\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n\n case \"hyperbolic regeneration chamber\":\n action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n\n default:\n return null;\n }\n\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player, args) {\n if (args.length !== 3) {\n this.postToConsole(\"Invalid usage of 'start' console command: start [type] [name]\");\n this.postToConsole(\"Use 'help start' for more info\");\n return;\n }\n\n const name = args[2];\n\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][name];\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + args[2]);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + args[2]);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + args[2]);\n }\n\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][name] != null) {\n this.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n this.action.name = name;\n this.startAction(player, this.action);\n } else {\n this.postToConsole(\"Invalid BlackOp name specified: \" + args[2]);\n }\n\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[1]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contract, op, blackop]\");\n break;\n }\n }\n\n executeSkillConsoleCommand(args) {\n switch (args.length) {\n case 1:\n {\n // Display Skill Help Command\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n\n case 2:\n {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillNames[i]];\n let level = 0;\n\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level, 0));\n }\n\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n\n if (mult && mult !== 1) {\n mult = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(mult, 3);\n\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\n\n default:\n console.warn(`Unrecognized SkillMult Key: ${multKeys[i]}`);\n break;\n }\n }\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n case 3:\n {\n const skillName = args[2];\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null || !(skill instanceof _Skill__WEBPACK_IMPORTED_MODULE_11__[/* Skill */ \"a\"])) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n }\n\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n\n this.postToConsole(skill.name + \": Level \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const pointCost = skill.calculateCost(currentLevel);\n\n if (this.skillPoints >= pointCost) {\n this.skillPoints -= pointCost;\n this.upgradeSkill(skill);\n this.log(skill.name + \" upgraded to Level \" + this.skills[skillName]);\n } else {\n this.postToConsole(\"You do not have enough Skill Points to upgrade this. You need \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(pointCost, 0));\n }\n } else {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n }\n\n break;\n }\n\n default:\n {\n this.postToConsole(\"Invalid usage of 'skill' console command: skill [action] [name]\");\n this.postToConsole(\"Use 'help skill' for more info\");\n break;\n }\n }\n }\n\n executeLogConsoleCommand(args) {\n if (args.length < 3) {\n this.postToConsole(\"Invalid usage of log command: log [enable/disable] [action/event]\");\n this.postToConsole(\"Use 'help log' for more details and examples\");\n return;\n }\n\n let flag = true;\n\n if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\n\n\n switch (args[2].toLowerCase()) {\n case \"general\":\n case \"gen\":\n this.logging.general = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for general actions\");\n break;\n\n case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n this.logging.ops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Operations\");\n break;\n\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n this.logging.blackops = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for BlackOps\");\n break;\n\n case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\n\n case \"all\":\n this.logging.general = flag;\n this.logging.contracts = flag;\n this.logging.ops = flag;\n this.logging.blackops = flag;\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for everything\");\n break;\n\n default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\");\n break;\n }\n }\n\n executeHelpConsoleCommand(args) {\n if (args.length === 1) {\n for (const line of _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"].helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"])) continue;\n const helpText = _data_Help__WEBPACK_IMPORTED_MODULE_13__[/* ConsoleHelpText */ \"a\"][args[i]];\n\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args) {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\");\n return;\n } // Enable/Disable\n\n\n if (args.length === 2) {\n const flag = args[1];\n\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\"When your stamina drops to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshLow, 0) + \", you will automatically switch to \" + this.automateActionLow.name + \". When your stamina recovers to \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(this.automateThreshHigh, 0) + \", you will automatically \" + \"switch to \" + this.automateActionHigh.name + \".\");\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (!(this.automateActionLow instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]) || !(this.automateActionHigh instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n return this.log(\"Failed to enable automation. Actions were not set\");\n }\n\n this.automateEnabled = true;\n this.log(\"Bladeburner automation enabled\");\n } else if (flag.toLowerCase().includes(\"d\")) {\n this.automateEnabled = false;\n this.log(\"Bladeburner automation disabled\");\n } else {\n this.log(\"Invalid argument for 'automate' console command: \" + args[1]);\n }\n\n return;\n } // Set variables\n\n\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n let highLow = false; // True for high, false for low\n\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][val],\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n\n break;\n\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n\n break;\n\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation,\n name: val\n });\n\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n\n break;\n\n case \"stamina\":\n if (isNaN(parseFloat(val))) {\n this.postToConsole(\"Invalid value specified for stamina threshold (must be numeric): \" + val);\n } else {\n if (highLow) {\n this.automateThreshHigh = Number(val);\n } else {\n this.automateThreshLow = Number(val);\n }\n\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n\n break;\n\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command) {\n /**\n * Returns an array with command and its arguments in each index.\n * e.g. skill \"blade's intuition\" foo returns [skill, blade's intuition, foo]\n * The input to the fn will be trimmed and will have all whitespace replaced w/ a single space\n */\n const args = [];\n let start = 0;\n let i = 0;\n\n while (i < command.length) {\n const c = command.charAt(i);\n\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === \" \")) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n\n continue;\n }\n } else if (c === \" \") {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n\n ++i;\n }\n\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n\n return args;\n }\n\n executeConsoleCommand(player, command) {\n command = command.trim();\n command = command.replace(/\\s\\s+/g, \" \"); // Replace all whitespace w/ a single space\n\n const args = this.parseCommandArguments(command);\n if (args.length <= 0) return; // Log an error?\n\n switch (args[0].toLowerCase()) {\n case \"automate\":\n this.executeAutomateConsoleCommand(args);\n break;\n\n case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n\n case \"stop\":\n this.resetAction();\n break;\n\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName) {\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n\n const rand = Math.random();\n let percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(2, 4); // Migration increases population change\n\n --sourceCity.comms;\n ++destCity.comms;\n }\n\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName, chance) {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n\n if (chance > 1) {\n chance /= 100;\n }\n\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent() {\n const chance = Math.random(); // Choose random source/destination city for events\n\n const sourceCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n\n while (destCityName === sourceCityName) {\n destCityName = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, 5)];\n }\n\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"]) || !(destCity instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"sourceCity/destCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n if (chance <= 0.05) {\n // New Synthoid Community, 5%\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else if (chance <= 0.1) {\n // Synthoid Community Migration, 5%\n if (sourceCity.comms <= 0) {\n // If no comms in source city, then instead trigger a new Synthoid community event\n ++sourceCity.comms;\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a new Synthoid community was formed in a city\");\n }\n } else {\n --sourceCity.comms;\n ++destCity.comms; // Change pop\n\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\");\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that a large number of Synthoids migrated from \" + sourceCityName + \" to some other city\");\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 20) / 100;\n\n if (this.logging.events) {\n this.log(\"Tensions between Synthoids and humans lead to riots in \" + sourceCityName + \"! Chaos increased\");\n }\n } else if (chance <= 0.9) {\n // Less Synthoids, 20%\n const percentage = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n\n if (this.logging.events) {\n this.log(\"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\");\n }\n } // 10% chance of nothing happening\n\n }\n /**\n * Process stat gains from Contracts, Operations, and Black Operations\n * @param action(Action obj) - Derived action class\n * @param success(bool) - Whether action was successful\n */\n\n\n gainActionStats(player, action, success) {\n const difficulty = action.getDifficulty();\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n\n const difficultyMult = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n const unweightedGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain * successMult * difficultyMult;\n const skillMult = this.skillMultipliers.expGain;\n player.gainHackingExp(unweightedGain * action.weights.hack * player.hacking_exp_mult * skillMult);\n player.gainStrengthExp(unweightedGain * action.weights.str * player.strength_exp_mult * skillMult);\n player.gainDefenseExp(unweightedGain * action.weights.def * player.defense_exp_mult * skillMult);\n player.gainDexterityExp(unweightedGain * action.weights.dex * player.dexterity_exp_mult * skillMult);\n player.gainAgilityExp(unweightedGain * action.weights.agi * player.agility_exp_mult * skillMult);\n player.gainCharismaExp(unweightedGain * action.weights.cha * player.charisma_exp_mult * skillMult);\n let intExp = unweightedIntGain * action.weights.int * skillMult;\n\n if (intExp > 1) {\n intExp = Math.pow(intExp, 0.8);\n }\n\n player.gainIntelligenceExp(intExp);\n }\n\n getDiplomacyEffectiveness(player) {\n // Returns a decimal by which the city's chaos level should be multiplied (e.g. 0.98)\n const CharismaLinearFactor = 1e3;\n const CharismaExponentialFactor = 0.045;\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player) {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player) {\n const effCharisma = player.charisma * this.skillMultipliers.effCha;\n const charismaFactor = Math.pow(effCharisma, 0.81) + effCharisma / 90;\n return Math.max(10, Math.round(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers() {\n this.skillMultipliers = {\n successChanceAll: 1,\n successChanceStealth: 1,\n successChanceKill: 1,\n successChanceContract: 1,\n successChanceOperation: 1,\n successChanceEstimate: 1,\n actionTime: 1,\n effHack: 1,\n effStr: 1,\n effDef: 1,\n effDex: 1,\n effAgi: 1,\n effCha: 1,\n effInt: 1,\n stamina: 1,\n money: 1,\n expGain: 1\n };\n }\n\n updateSkillMultipliers() {\n this.resetSkillMultipliers();\n\n for (const skillName in this.skills) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n\n const level = this.skills[skillName];\n\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n } // Calculate team losses\n\n\n const teamCount = action.teamCount;\n\n if (teamCount >= 1) {\n let max;\n\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n\n break;\n\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n\n if (Math.random() < 0.02 * this.skillMultipliers.successChanceEstimate) {\n city.improveCommunityEstimate(1);\n }\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n\n break;\n\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByCount(0.1);\n break;\n\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true\n });\n --city.comms;\n --city.commsEst;\n } else {\n const change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 5));\n break;\n\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-3, -1));\n break;\n\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n }\n\n city.changeChaosByPercentage(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(-5, 5));\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId) {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n return this.contracts[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return this.operations[actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][actionId.name];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Training\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Field Analysis\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Recruitment\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Diplomacy\"];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return _GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"][\"Hyperbolic Regeneration Chamber\"];\n\n default:\n return null;\n }\n }\n\n completeContract(success) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n\n const city = this.getCurrentCity();\n\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(100, 1e3));\n break;\n\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.02);\n break;\n\n case \"Retirement\":\n city.changePopulationByCount(-1, {\n estChange: -1,\n estOffset: 0\n });\n city.changeChaosByCount(0.04);\n break;\n\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router, player) {\n switch (this.action.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n {\n try {\n const isOperation = this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"];\n const action = this.getActionObject(this.action);\n\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1); // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Process Contract/Operation success/failure\n\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count; // Earn money for contracts\n\n let moneyGain = 0;\n\n if (!isOperation) {\n moneyGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel);\n }\n\n if (action.rankGain) {\n const gain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, gain);\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract successfully completed! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(gain, 3) + \" rank and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain));\n }\n }\n\n isOperation ? this.completeOperation(true) : this.completeContract(true);\n } else {\n this.gainActionStats(player, action, false);\n ++action.failures;\n let loss = 0,\n damage = 0;\n\n if (action.rankLoss) {\n loss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n this.hpLost += damage;\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n let logLossText = \"\";\n\n if (loss > 0) {\n logLossText += \"Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(loss, 3) + \" rank. \";\n }\n\n if (damage > 0) {\n logLossText += \"Took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage.\";\n }\n\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" failed! \" + logLossText);\n } else if (!isOperation && this.logging.contracts) {\n this.log(action.name + \" contract failed! \" + logLossText);\n }\n\n isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n\n\n this.startAction(player, this.action); // Repeat action\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n {\n try {\n const action = this.getActionObject(this.action);\n\n if (action == null || !(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n\n const difficulty = action.getDifficulty();\n const difficultyMultiplier = Math.pow(difficulty, _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultExponentialFactor) + difficulty / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].DiffMultLinearFactor; // Stamina loss is based on difficulty\n\n this.stamina -= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss * difficultyMultiplier;\n\n if (this.stamina < 0) {\n this.stamina = 0;\n } // Team loss variables\n\n\n const teamCount = action.teamCount;\n let teamLossMax;\n\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n action.count = 0;\n this.blackops[action.name] = true;\n let rankGain = 0;\n\n if (action.rankGain) {\n rankGain = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankGain * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n\n teamLossMax = Math.ceil(teamCount / 2); // Operation Daedalus\n\n if (action.name === \"Operation Daedalus\") {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n\n if (action.rankLoss) {\n rankLoss = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_19__[/* addOffset */ \"a\"])(damage, 10));\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_22__[/* calculateHospitalizationCost */ \"a\"])(player, damage);\n\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(action.name + \" failed! Lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(rankLoss, 1) + \" rank and took \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(damage, 0) + \" damage\");\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n // Calculate team lossses\n\n if (teamCount >= 1) {\n const losses = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n\n if (this.logging.blackops) {\n this.log(\"You lost \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_14__[/* exceptionAlert */ \"a\"])(e);\n }\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n {\n this.stamina -= 0.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStaminaLoss;\n const strExpGain = 30 * player.strength_exp_mult,\n defExpGain = 30 * player.defense_exp_mult,\n dexExpGain = 30 * player.dexterity_exp_mult,\n agiExpGain = 30 * player.agility_exp_mult,\n staminaGain = 0.04 * this.skillMultipliers.stamina;\n player.gainStrengthExp(strExpGain);\n player.gainDefenseExp(defExpGain);\n player.gainDexterityExp(dexExpGain);\n player.gainAgilityExp(agiExpGain);\n this.staminaBonus += staminaGain;\n\n if (this.logging.general) {\n this.log(\"Training completed. Gained: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(strExpGain, 1) + \" str exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(defExpGain, 1) + \" def exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(dexExpGain, 1) + \" dex exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(agiExpGain, 1) + \" agi exp, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(staminaGain, 3) + \" max stamina\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff = 0.04 * Math.pow(player.hacking_skill, 0.3) + 0.04 * Math.pow(player.intelligence, 0.9) + 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n\n const hackingExpGain = 20 * player.hacking_exp_mult,\n charismaExpGain = 20 * player.charisma_exp_mult;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, 0.1 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_18__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n\n if (this.logging.general) {\n this.log(\"Field analysis completed. Gained 0.1 rank, \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(hackingExpGain, 1) + \" hacking exp, and \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(charismaExpGain, 1) + \" charisma exp\");\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const successChance = this.getRecruitmentSuccessChance(player);\n\n if (Math.random() < successChance) {\n const expGain = 2 * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_9__[/* formatNumber */ \"c\"])(expGain, 1) + \" charisma exp\");\n }\n }\n\n this.startAction(player, this.action); // Repeat action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n\n if (this.logging.general) {\n this.log(`Diplomacy completed. Chaos levels in the current city fell by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatPercentage(1 - eff)}`);\n }\n\n this.startAction(player, this.action); // Repeat Action\n\n break;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n {\n player.regenerateHp(_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain);\n const staminaGain = this.maxStamina * (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n\n if (this.logging.general) {\n this.log(`Rested in Hyperbolic Regeneration Chamber. Restored ${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].HrcHpGain} HP and gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_17__[/* numeralWrapper */ \"a\"].formatStamina(staminaGain)} stamina`);\n }\n\n break;\n }\n\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player, change) {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n\n this.rank += change;\n\n if (this.rank < 0) {\n this.rank = 0;\n }\n\n this.maxRank = Math.max(this.rank, this.maxRank);\n const bladeburnersFactionName = \"Bladeburners\";\n\n if (Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* factionExists */ \"b\"])(bladeburnersFactionName)) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][bladeburnersFactionName];\n\n if (!(bladeburnerFac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_20__[/* Faction */ \"a\"])) {\n throw new Error(\"Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button\");\n }\n\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation += _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n } // Gain skill points\n\n\n const rankNeededForSp = (this.totalSkillPoints + 1) * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint;\n\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor((this.maxRank - rankNeededForSp) / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RanksPerSkillPoint + 1);\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router, player, seconds) {\n if (this.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) return;\n\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n\n if (!(this.action instanceof _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"])) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n } // If the previous action went past its completion time, add to the next action\n // This is not added inmediatly in case the automation changes the action\n\n\n this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\n\n if (this.actionTimeCurrent >= this.actionTimeToComplete) {\n this.actionTimeOverflow = this.actionTimeCurrent - this.actionTimeToComplete;\n return this.completeAction(router, player);\n }\n }\n\n calculateStaminaGainPerSecond(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].MaxStaminaToGainFactor;\n const gain = (_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player) {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) * this.skillMultipliers.stamina * player.bladeburner_max_stamina_mult;\n\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = this.maxStamina * this.stamina / oldMax;\n }\n\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create() {\n this.contracts[\"Tracking\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Tracking\",\n desc: \"Identify and locate Synthoids. This contract involves reconnaissance \" + \"and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

\" + \"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for \" + \"whatever city you are currently in.\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(25, 150),\n weights: {\n hack: 0,\n str: 0.05,\n def: 0.05,\n dex: 0.35,\n agi: 0.35,\n cha: 0.1,\n int: 0.05\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.9,\n int: 1\n },\n isStealth: true\n });\n this.contracts[\"Bounty Hunter\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Bounty Hunter\",\n desc: \"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

\" + \"Successfully completing a Bounty Hunter contract will lower the population in your \" + \"current city, and will also increase its chaos level.\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.15,\n def: 0.15,\n dex: 0.25,\n agi: 0.25,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.contracts[\"Retirement\"] = new _Contract__WEBPACK_IMPORTED_MODULE_7__[/* Contract */ \"a\"]({\n name: \"Retirement\",\n desc: \"Hunt down and retire (kill) rogue Synthoids.

\" + \"Successfully completing a Retirement contract will lower the population in your current \" + \"city, and will also increase its chaos level.\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(5, 150),\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0.1,\n int: 0.1\n },\n decays: {\n hack: 0,\n str: 0.91,\n def: 0.91,\n dex: 0.91,\n agi: 0.91,\n cha: 0.8,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Investigation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Investigation\",\n desc: \"As a field agent, investigate and identify Synthoid \" + \"populations, movements, and operations.

Successful \" + \"Investigation ops will increase the accuracy of your \" + \"synthoid data.

\" + \"You will NOT lose HP from failed Investigation ops.\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.1,\n cha: 0.25,\n int: 0.1\n },\n decays: {\n hack: 0.85,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Undercover Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Undercover Operation\",\n desc: \"Conduct undercover operations to identify hidden \" + \"and underground Synthoid communities and organizations.

\" + \"Successful Undercover ops will increase the accuracy of your synthoid \" + \"data.\",\n baseDifficulty: 500,\n difficultyFac: 1.04,\n rewardFac: 1.09,\n reqdRank: 100,\n rankGain: 4.4,\n rankLoss: 0.4,\n hpLoss: 2,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 100),\n weights: {\n hack: 0.2,\n str: 0.05,\n def: 0.05,\n dex: 0.2,\n agi: 0.2,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Sting Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Sting Operation\",\n desc: \"Conduct a sting operation to bait and capture particularly \" + \"notorious Synthoid criminals.\",\n baseDifficulty: 650,\n difficultyFac: 1.04,\n rewardFac: 1.095,\n reqdRank: 500,\n rankGain: 5.5,\n rankLoss: 0.5,\n hpLoss: 2.5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.25,\n str: 0.05,\n def: 0.05,\n dex: 0.25,\n agi: 0.1,\n cha: 0.2,\n int: 0.1\n },\n decays: {\n hack: 0.8,\n str: 0.85,\n def: 0.85,\n dex: 0.85,\n agi: 0.85,\n cha: 0.7,\n int: 0.9\n },\n isStealth: true\n });\n this.operations[\"Raid\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Raid\",\n desc: \"Lead an assault on a known Synthoid community. Note that \" + \"there must be an existing Synthoid community in your current city \" + \"in order for this Operation to be successful.\",\n baseDifficulty: 800,\n difficultyFac: 1.045,\n rewardFac: 1.1,\n reqdRank: 3000,\n rankGain: 55,\n rankLoss: 2.5,\n hpLoss: 50,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isKill: true\n });\n this.operations[\"Stealth Retirement Operation\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Stealth Retirement Operation\",\n desc: \"Lead a covert operation to retire Synthoids. The \" + \"objective is to complete the task without \" + \"drawing any attention. Stealth and discretion are key.\",\n baseDifficulty: 1000,\n difficultyFac: 1.05,\n rewardFac: 1.11,\n reqdRank: 20e3,\n rankGain: 22,\n rankLoss: 2,\n hpLoss: 10,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.7,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.9\n },\n isStealth: true,\n isKill: true\n });\n this.operations[\"Assassination\"] = new _Operation__WEBPACK_IMPORTED_MODULE_6__[/* Operation */ \"a\"]({\n name: \"Assassination\",\n desc: \"Assassinate Synthoids that have been identified as \" + \"important, high-profile social and political leaders \" + \"in the Synthoid communities.\",\n baseDifficulty: 1500,\n difficultyFac: 1.06,\n rewardFac: 1.14,\n reqdRank: 50e3,\n rankGain: 44,\n rankLoss: 4,\n hpLoss: 5,\n count: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(1, 150),\n weights: {\n hack: 0.1,\n str: 0.1,\n def: 0.1,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.8\n },\n isStealth: true,\n isKill: true\n });\n }\n\n process(router, player) {\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (_RedPill__WEBPACK_IMPORTED_MODULE_23__[/* redPillFlag */ \"b\"] === false && this.blackops.hasOwnProperty(\"Operation Daedalus\")) {\n return router.toBitVerse(false, false);\n } // If the Player starts doing some other actions, set action to idle and alert\n\n\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_26__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_27__[/* AugmentationNames */ \"a\"].BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\n\n if (this.automateEnabled) {\n msg += `

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console`;\n this.automateEnabled = false;\n }\n\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_25__[/* Settings */ \"a\"].SuppressBladeburnerPopup) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(msg);\n }\n }\n\n this.resetAction();\n } // If the Player has no Stamina, set action to idle\n\n\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n } // A 'tick' for this mechanic is one second (= 5 game cycles)\n\n\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n\n this.storedCycles -= seconds * _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CyclesPerSecond; // Stamina\n\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina); // Count increase for contracts/operations\n\n for (const contract of Object.values(this.contracts)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n\n for (const op of Object.values(this.operations)) {\n const growthF = _data_Growths__WEBPACK_IMPORTED_MODULE_3__[/* Growths */ \"a\"][op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n\n if (growthF !== undefined) {\n op.count += seconds * growthF() / _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].ActionCountGrowthPeriod;\n }\n } // Chaos goes down very slowly\n\n\n for (const cityName of _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].CityNames) {\n const city = this.cities[cityName];\n\n if (!(city instanceof _City__WEBPACK_IMPORTED_MODULE_12__[/* City */ \"a\"])) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n } // Random Events\n\n\n this.randomEventCounter -= seconds;\n\n if (this.randomEventCounter <= 0) {\n this.randomEvent(); // Add instead of setting because we might have gone over the required time for the event\n\n this.randomEventCounter += Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_15__[/* getRandomInt */ \"a\"])(240, 600);\n }\n\n this.processAction(router, player, seconds); // Automation\n\n if (this.automateEnabled) {\n // Note: Do NOT set this.action = this.automateActionHigh/Low since it creates a reference\n if (this.stamina <= this.automateThreshLow) {\n if (this.action.name !== this.automateActionLow.name || this.action.type !== this.automateActionLow.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionLow.type,\n name: this.automateActionLow.name\n });\n this.startAction(player, this.action);\n }\n } else if (this.stamina >= this.automateThreshHigh) {\n if (this.action.name !== this.automateActionHigh.name || this.action.type !== this.automateActionHigh.type) {\n this.action = new _ActionIdentifier__WEBPACK_IMPORTED_MODULE_1__[/* ActionIdentifier */ \"a\"]({\n type: this.automateActionHigh.type,\n name: this.automateActionHigh.name\n });\n this.startAction(player, this.action);\n }\n }\n }\n }\n }\n\n getTypeAndNameFromActionId(actionId) {\n const res = {\n type: \"\",\n name: \"\"\n };\n const types = Object.keys(_data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"]);\n\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][types[i]]) {\n res.type = types[i];\n break;\n }\n }\n\n if (res.type == null) {\n res.type = \"Idle\";\n }\n\n res.name = actionId.name != null ? actionId.name : \"Idle\";\n return res;\n }\n\n getContractNamesNetscriptFn() {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn() {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn() {\n return Object.keys(_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]);\n }\n\n getGeneralActionNamesNetscriptFn() {\n return Object.keys(_GeneralActions__WEBPACK_IMPORTED_MODULE_8__[/* GeneralActions */ \"a\"]);\n }\n\n getSkillNamesNetscriptFn() {\n return Object.keys(_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"]);\n }\n\n startActionNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n } // Special logic for Black Ops\n\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]) {\n // Can't start a BlackOp if you don't have the required rank\n const action = this.getActionObject(actionId);\n if (action == null) throw new Error(`Action not found ${actionId.type}, ${actionId.name}`);\n if (!(action instanceof _BlackOperation__WEBPACK_IMPORTED_MODULE_5__[/* BlackOperation */ \"a\"])) throw new Error(`Action should be BlackOperation but isn't`); //const blackOp = (action as BlackOperation);\n\n if (action.reqdRank > this.rank) {\n workerScript.log(\"bladeburner.startAction\", `Insufficient rank to start Black Op '${actionId.name}'.`);\n return false;\n } // Can't start a BlackOp if its already been done\n\n\n if (this.blackops[actionId.name] != null) {\n workerScript.log(\"bladeburner.startAction\", `Black Op ${actionId.name} has already been completed.`);\n return false;\n } // Can't start a BlackOp if you haven't done the one before it\n\n\n const blackops = [];\n\n for (const nm in _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"].hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n\n blackops.sort(function (a, b) {\n return _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][a].reqdRank - _BlackOperations__WEBPACK_IMPORTED_MODULE_4__[/* BlackOperations */ \"a\"][b].reqdRank; // Sort black ops in intended order\n });\n const i = blackops.indexOf(actionId.name);\n\n if (i === -1) {\n workerScript.log(\"bladeburner.startAction\", `Invalid Black Op: '${name}'`);\n return false;\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n workerScript.log(\"bladeburner.startAction\", `Preceding Black Op must be completed before starting '${actionId.name}'.`);\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\"bladeburner.startAction\", `Starting bladeburner action with type '${type}' and name ${name}\"`);\n return true;\n } catch (e) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getActionTime(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n return 30;\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n return this.getRecruitmentTime(player);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return 60;\n\n default:\n workerScript.log(\"bladeburner.getActionTime\", errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return [1, 1];\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type, name, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Contract\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"]:\n return Math.floor(actionObj.count);\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Training\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Recruitment\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Field Analysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"FieldAnalysis\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Diplomacy\"]:\n case _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Hyperbolic Regeneration Chamber\"]:\n return Infinity;\n\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillLevel\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n if (this.skills[skillName] == null) {\n return 0;\n } else {\n return this.skills[skillName];\n }\n }\n\n getSkillUpgradeCostNetscriptFn(skillName, workerScript) {\n if (skillName === \"\" || !_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n\n if (this.skills[skillName] == null) {\n return skill.calculateCost(0);\n } else {\n return skill.calculateCost(this.skills[skillName]);\n }\n }\n\n upgradeSkillNetscriptFn(skillName, workerScript) {\n const errorLogText = `Invalid skill: '${skillName}'`;\n\n if (!_Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"].hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", errorLogText);\n return false;\n }\n\n const skill = _Skills__WEBPACK_IMPORTED_MODULE_10__[/* Skills */ \"a\"][skillName];\n let currentLevel = 0;\n\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n\n const cost = skill.calculateCost(currentLevel);\n\n if (skill.maxLvl && currentLevel >= skill.maxLvl) {\n workerScript.log(\"bladeburner.upgradeSkill\", `Skill '${skillName}' is already maxed.`);\n return false;\n }\n\n if (this.skillPoints < cost) {\n workerScript.log(\"bladeburner.upgradeSkill\", `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`);\n return false;\n }\n\n this.skillPoints -= cost;\n this.upgradeSkill(skill);\n workerScript.log(\"bladeburner.upgradeSkill\", `'${skillName}' upgraded to level ${this.skills[skillName]}`);\n return true;\n }\n\n getTeamSizeNetscriptFn(type, name, workerScript) {\n if (type === \"\" && name === \"\") {\n return this.teamSize;\n }\n\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] || actionId.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type, name, size, workerScript) {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n if (actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"Operation\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOp\"] && actionId.type !== _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"]) {\n workerScript.log(\"bladeburner.setTeamSize\", \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", `Invalid size: ${size}`);\n return -1;\n }\n\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\n }\n\n actionObj.teamCount = sanitizedSize;\n workerScript.log(\"bladeburner.setTeamSize\", `Team size for '${name}' set to ${sanitizedSize}.`);\n return sanitizedSize;\n }\n\n joinBladeburnerFactionNetscriptFn(workerScript) {\n const bladeburnerFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_21__[/* Factions */ \"a\"][\"Bladeburners\"];\n\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= _data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_29__[/* joinFaction */ \"d\"])(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", \"Joined Bladeburners faction.\");\n return true;\n } else {\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", `You do not have the required rank (${this.rank}/${_data_Constants__WEBPACK_IMPORTED_MODULE_16__[/* BladeburnerConstants */ \"a\"].RankNeededForFaction}).`);\n return false;\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Bladeburner\", this);\n }\n /**\n * Initiatizes a Bladeburner object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Bladeburner, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Bladeburner = Bladeburner;\n\n//# sourceURL=webpack:///./src/Bladeburner/Bladeburner.ts?"); /***/ }), /* 172 */ @@ -1457,7 +1457,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Company; });\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPosition */ 275);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\nconst DefaultConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n};\nclass Company {\n /**\n * Company name\n */\n\n /**\n * Description and general information about company\n */\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n\n /**\n * Company-specific multiplier for earnings\n */\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n\n /**\n * Properties to track the player's progress in this company\n */\n constructor(p = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n }\n\n hasPosition(pos) {\n if (pos instanceof _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPosition */ \"a\"]) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"][0]] != null;\n }\n\n hasBusinessConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"][0]] != null;\n }\n\n hasBusinessPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"][0]] != null;\n }\n\n hasEmployeePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][1]] != null;\n }\n\n hasITPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"][0]] != null;\n }\n\n hasSecurityPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"][2]] != null;\n }\n\n hasSoftwareConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]] != null;\n }\n\n hasSoftwarePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"][0]] != null;\n }\n\n hasWaiterPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][0]] != null;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorBase * Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorMult, this.favor);\n\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n\n reqdRep *= _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].FactionReputationToFavorMult;\n }\n\n return [favorGain, rep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Company\", this);\n }\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Company, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Company = Company;\n\n//# sourceURL=webpack:///./src/Company/Company.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Company; });\n/* harmony import */ var _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPosition */ 276);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\n\n\nconst DefaultConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0\n};\nclass Company {\n /**\n * Company name\n */\n\n /**\n * Description and general information about company\n */\n\n /**\n * Object that holds all available positions in this Company.\n * Position names are held in keys.\n * The values for the keys don't matter, but we'll make them booleans\n *\n * Must match names of Company Positions, defined in data/companypositionnames.ts\n */\n\n /**\n * Company-specific multiplier for earnings\n */\n\n /**\n * The additional levels of stats you need to quality for a job\n * in this company.\n *\n * For example, the base stat requirement for an intern position is 1.\n * But if a company has a offset of 200, then you would need stat(s) of 201\n */\n\n /**\n * Properties to track the player's progress in this company\n */\n constructor(p = DefaultConstructorParams) {\n this.name = p.name;\n this.info = p.info;\n this.companyPositions = p.companyPositions;\n this.expMultiplier = p.expMultiplier;\n this.salaryMultiplier = p.salaryMultiplier;\n this.jobStatReqOffset = p.jobStatReqOffset;\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.rolloverRep = 0;\n }\n\n hasPosition(pos) {\n if (pos instanceof _CompanyPosition__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPosition */ \"a\"]) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"][0]] != null;\n }\n\n hasBusinessConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"][0]] != null;\n }\n\n hasBusinessPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"][0]] != null;\n }\n\n hasEmployeePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][1]] != null;\n }\n\n hasITPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"][0]] != null;\n }\n\n hasSecurityPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"][2]] != null;\n }\n\n hasSoftwareConsultantPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]] != null;\n }\n\n hasSoftwarePositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"][0]] != null;\n }\n\n hasWaiterPositions() {\n return this.companyPositions[_data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* MiscCompanyPositions */ \"e\"][0]] != null;\n }\n\n gainFavor() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n const res = this.getFavorGain();\n\n if (res.length != 2) {\n console.error(\"Invalid result from getFavorGain() function\");\n return;\n }\n\n this.favor += res[0];\n this.rolloverRep = res[1];\n }\n\n getFavorGain() {\n if (this.favor == null) {\n this.favor = 0;\n }\n\n if (this.rolloverRep == null) {\n this.rolloverRep = 0;\n }\n\n let favorGain = 0,\n rep = this.playerReputation + this.rolloverRep;\n let reqdRep = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorBase * Math.pow(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].CompanyReputationToFavorMult, this.favor);\n\n while (rep > 0) {\n if (rep >= reqdRep) {\n ++favorGain;\n rep -= reqdRep;\n } else {\n break;\n }\n\n reqdRep *= _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].FactionReputationToFavorMult;\n }\n\n return [favorGain, rep];\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Company\", this);\n }\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Company, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Company = Company;\n\n//# sourceURL=webpack:///./src/Company/Company.ts?"); /***/ }), /* 173 */ @@ -1482,7 +1482,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Warehouse; });\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Material */ 130);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass Warehouse {\n // Text that describes how the space in this Warehouse is being used\n // Used to create a tooltip in the UI\n // Warehouse's level, which affects its maximum size\n // Amount of space currently used by warehouse\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n constructor(params = {}) {\n var _params$corp;\n\n _defineProperty(this, \"breakdown\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"sizeUsed\", 0);\n\n _defineProperty(this, \"smartSupplyEnabled\", false);\n\n _defineProperty(this, \"smartSupplyUseLeftovers\", {});\n\n _defineProperty(this, \"smartSupplyStore\", 0);\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n this.materials = {\n Water: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Water\"\n }),\n Energy: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Energy\"\n }),\n Food: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Food\"\n }),\n Plants: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Plants\"\n }),\n Metal: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Metal\"\n }),\n Hardware: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Hardware\"\n }),\n Chemicals: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Chemicals\"\n }),\n Drugs: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Drugs\"\n }),\n Robots: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Robots\"\n }),\n AICores: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"AI Cores\"\n }),\n RealEstate: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Real Estate\"\n })\n };\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n } // Default smart supply to being enabled if the upgrade is unlocked\n\n\n if ((_params$corp = params.corp) !== null && _params$corp !== void 0 && _params$corp.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n } // Re-calculate how much space is being used by this Warehouse\n\n\n updateMaterialSizeUsed() {\n this.sizeUsed = 0;\n this.breakdown = \"\";\n\n for (const matName in this.materials) {\n const mat = this.materials[matName];\n\n if (_MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"].hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName];\n\n if (mat.qty > 0) {\n this.breakdown += matName + \": \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName], \"0,0.0\") + \"
\";\n }\n }\n }\n\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation, industry) {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Warehouse\", this);\n } // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Warehouse, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Warehouse = Warehouse;\n\n//# sourceURL=webpack:///./src/Corporation/Warehouse.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Warehouse; });\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Material */ 131);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass Warehouse {\n // Text that describes how the space in this Warehouse is being used\n // Used to create a tooltip in the UI\n // Warehouse's level, which affects its maximum size\n // Amount of space currently used by warehouse\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n // Stores the amount of product to be produced. Used for Smart Supply unlock.\n // The production tracked by smart supply is always based on the previous cycle,\n // so it will always trail the \"true\" production by 1 cycle\n constructor(params = {}) {\n var _params$corp;\n\n _defineProperty(this, \"breakdown\", \"\");\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"sizeUsed\", 0);\n\n _defineProperty(this, \"smartSupplyEnabled\", false);\n\n _defineProperty(this, \"smartSupplyUseLeftovers\", {});\n\n _defineProperty(this, \"smartSupplyStore\", 0);\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n this.materials = {\n Water: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Water\"\n }),\n Energy: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Energy\"\n }),\n Food: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Food\"\n }),\n Plants: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Plants\"\n }),\n Metal: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Metal\"\n }),\n Hardware: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Hardware\"\n }),\n Chemicals: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Chemicals\"\n }),\n Drugs: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Drugs\"\n }),\n Robots: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Robots\"\n }),\n AICores: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"AI Cores\"\n }),\n RealEstate: new _Material__WEBPACK_IMPORTED_MODULE_0__[/* Material */ \"a\"]({\n name: \"Real Estate\"\n })\n };\n this.smartSupplyUseLeftovers = {\n Water: true,\n Energy: true,\n Food: true,\n Plants: true,\n Metal: true,\n Hardware: true,\n Chemicals: true,\n Drugs: true,\n Robots: true,\n AICores: true,\n RealEstate: true\n };\n\n if (params.corp && params.industry) {\n this.updateSize(params.corp, params.industry);\n } // Default smart supply to being enabled if the upgrade is unlocked\n\n\n if ((_params$corp = params.corp) !== null && _params$corp !== void 0 && _params$corp.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n } // Re-calculate how much space is being used by this Warehouse\n\n\n updateMaterialSizeUsed() {\n this.sizeUsed = 0;\n this.breakdown = \"\";\n\n for (const matName in this.materials) {\n const mat = this.materials[matName];\n\n if (_MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"].hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName];\n\n if (mat.qty > 0) {\n this.breakdown += matName + \": \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].format(mat.qty * _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName], \"0,0.0\") + \"
\";\n }\n }\n }\n\n if (this.sizeUsed > this.size) {\n console.warn(\"Warehouse size used greater than capacity, something went wrong\");\n }\n }\n\n updateSize(corporation, industry) {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Warehouse\", this);\n } // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Warehouse, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Warehouse = Warehouse;\n\n//# sourceURL=webpack:///./src/Corporation/Warehouse.ts?"); /***/ }), /* 176 */, @@ -1495,7 +1495,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberTasks; });\n/* harmony import */ var _data_tasks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/tasks */ 701);\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTask */ 440);\n\n\nconst GangMemberTasks = {};\n\n(function () {\n _data_tasks__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberTasksMetadata */ \"a\"].forEach(e => {\n GangMemberTasks[e.name] = new _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTask */ \"a\"](e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberTasks.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberTasks; });\n/* harmony import */ var _data_tasks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/tasks */ 701);\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTask */ 441);\n\n\nconst GangMemberTasks = {};\n\n(function () {\n _data_tasks__WEBPACK_IMPORTED_MODULE_0__[/* gangMemberTasksMetadata */ \"a\"].forEach(e => {\n GangMemberTasks[e.name] = new _GangMemberTask__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTask */ \"a\"](e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n\n//# sourceURL=webpack:///./src/Gang/GangMemberTasks.ts?"); /***/ }), /* 178 */, @@ -1614,6 +1614,18 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 192 */, /* 193 */, /* 194 */ +/*!************************************!*\ + !*** ./src/Locations/Locations.ts ***! + \************************************/ +/*! exports provided: Locations */ +/*! exports used: Locations */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Locations; });\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./City */ 323);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cities */ 105);\n/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Location */ 528);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/CityNames */ 21);\n/* harmony import */ var _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/LocationsMetadata */ 712);\n/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\n\n\n\n\n\nconst Locations = {};\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\n\nfunction constructLocation(p) {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"]) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"](p);\n return Locations[p.name];\n} // First construct all cities\n\n\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n \\\\ [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `; // Then construct all locations, and add them to the cities as we go.\n\nfor (const metadata of _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__[/* LocationsMetadata */ \"a\"]) {\n const loc = constructLocation(metadata);\n const cityName = loc.city;\n\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"]) {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][city].addLocation(loc.name);\n }\n } else {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][cityName].addLocation(loc.name);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/Locations.ts?"); + +/***/ }), +/* 195 */ /*!***********************************!*\ !*** ./src/Infiltration/utils.ts ***! \***********************************/ @@ -1625,8 +1637,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return random; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getArrow; });\nfunction random(min, max) {\n return Math.random() * (max - min) + min;\n}\nfunction getArrow(event) {\n switch (event.keyCode) {\n case 38:\n case 87:\n return \"↑\";\n\n case 65:\n case 37:\n return \"←\";\n\n case 40:\n case 83:\n return \"↓\";\n\n case 39:\n case 68:\n return \"→\";\n }\n\n return \"\";\n}\n\n//# sourceURL=webpack:///./src/Infiltration/utils.ts?"); /***/ }), -/* 195 */, -/* 196 */ +/* 196 */, +/* 197 */ /*!*************************!*\ !*** ./src/TextFile.ts ***! \*************************/ @@ -1635,10 +1647,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getTextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTextFile; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n\n\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\n\nclass TextFile {\n /**\n * The full file name.\n */\n\n /**\n * The content of the file.\n */\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n /**\n * Concatenates the raw values to the end of current content.\n */\n\n\n append(txt) {\n this.text += txt;\n }\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n\n\n download() {\n const filename = this.fn;\n const file = new Blob([this.text], {\n type: \"text/plain\"\n });\n /* tslint:disable-next-line:strict-boolean-expressions */\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\");\n const url = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Retrieve the content of the file.\n */\n\n\n read() {\n return this.text;\n }\n /**\n * Shows the content to the user via the game's dialog box.\n */\n\n\n show() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`${this.fn}

${this.text}`, true);\n }\n /**\n * Serialize the current file to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"TextFile\", this);\n }\n /**\n * Replaces the current content with the text provided.\n */\n\n\n write(txt) {\n this.text = txt;\n }\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(TextFile, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.TextFile = TextFile;\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction getTextFile(fn, server) {\n const filename = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n for (const file of server.textFiles) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createTextFile(fn, txt, server) {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n return undefined;\n }\n\n const file = new TextFile(fn, txt);\n server.textFiles.push(file);\n return file;\n}\n\n//# sourceURL=webpack:///./src/TextFile.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return getTextFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return createTextFile; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n\n\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\n\nclass TextFile {\n /**\n * The full file name.\n */\n\n /**\n * The content of the file.\n */\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n /**\n * Concatenates the raw values to the end of current content.\n */\n\n\n append(txt) {\n this.text += txt;\n }\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n\n\n download() {\n const filename = this.fn;\n const file = new Blob([this.text], {\n type: \"text/plain\"\n });\n /* tslint:disable-next-line:strict-boolean-expressions */\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\");\n const url = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Retrieve the content of the file.\n */\n\n\n read() {\n return this.text;\n }\n /**\n * Shows the content to the user via the game's dialog box.\n */\n\n\n show() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`${this.fn}

${this.text}`, true);\n }\n /**\n * Serialize the current file to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"TextFile\", this);\n }\n /**\n * Replaces the current content with the text provided.\n */\n\n\n write(txt) {\n this.text = txt;\n }\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(TextFile, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.TextFile = TextFile;\n/**\n * Retrieve the file object for the filename on the specified server.\n * @param fn The file name to look for\n * @param server The server object to look in\n * @returns The file object, or null if it couldn't find it.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction getTextFile(fn, server) {\n const filename = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n for (const file of server.textFiles) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\n/**\n * Creates a TextFile on the target server.\n * @param fn The file name to create.\n * @param txt The contents of the file.\n * @param server The server that the file should be created on.\n * @returns The instance of the file.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\nfunction createTextFile(fn, txt, server) {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n return undefined;\n }\n\n const file = new TextFile(fn, txt);\n server.textFiles.push(file);\n return file;\n}\n\n//# sourceURL=webpack:///./src/TextFile.ts?"); /***/ }), -/* 197 */ +/* 198 */ /*!**********************************************!*\ !*** ./src/Hacknet/formulas/HacknetNodes.ts ***! \**********************************************/ @@ -1650,7 +1662,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return calculateMoneyGainRate; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateLevelUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return calculateRamUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateCoreUpgradeCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return calculateNodeCost; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n\n\nfunction calculateMoneyGainRate(level, ram, cores, mult) {\n const gainPerLevel = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MoneyGainPerLevel;\n const levelMult = level * gainPerLevel;\n const ramMult = Math.pow(1.035, ram - 1);\n const coresMult = (cores + 5) / 6;\n return levelMult * ramMult * coresMult * mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney;\n}\nfunction calculateLevelUpgradeCost(startingLevel, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n return Infinity;\n }\n\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].BaseCost / 2 * totalMultiplier * costMult;\n}\nfunction calculateRamUpgradeCost(startingRam, extraLevels = 1, costMult = 1) {\n const sanitizedLevels = Math.round(extraLevels);\n\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].RamBaseCost;\n const mult = Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeRamMult, numUpgrades);\n totalCost += baseCost * mult;\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateCoreUpgradeCost(startingCore, extraLevels = 1, costMult = 1) {\n const sanitizedCores = Math.round(extraLevels);\n\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].CoreBaseCost;\n const mult = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n return totalCost;\n}\nfunction calculateNodeCost(n, mult = 1) {\n if (n <= 0) {\n return 0;\n }\n\n return _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].BaseCost * Math.pow(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].PurchaseNextMult, n - 1) * mult;\n}\n\n//# sourceURL=webpack:///./src/Hacknet/formulas/HacknetNodes.ts?"); /***/ }), -/* 198 */ +/* 199 */ /*!*********************************************!*\ !*** ./src/PersonObjects/formulas/skill.ts ***! \*********************************************/ @@ -1662,7 +1674,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateExp; });\nfunction calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\nfunction calculateExp(skill, mult = 1) {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/formulas/skill.ts?"); /***/ }), -/* 199 */ +/* 200 */ /*!********************************************!*\ !*** ./src/Bladeburner/BlackOperations.ts ***! \********************************************/ @@ -1674,7 +1686,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOperations; });\n/* harmony import */ var _BlackOperation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BlackOperation */ 99);\n\nconst BlackOperations = {};\n\n(function () {\n BlackOperations[\"Operation Typhoon\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Typhoon\",\n desc: \"Obadiah Zenyatta is the leader of a RedWater PMC. It has long \" + \"been known among the intelligence community that Zenyatta, along \" + \"with the rest of the PMC, is a Synthoid.

\" + \"The goal of Operation Typhoon is to find and eliminate \" + \"Zenyatta and RedWater by any means necessary. After the task \" + \"is completed, the actions must be covered up from the general public.\",\n baseDifficulty: 2000,\n reqdRank: 2.5e3,\n rankGain: 50,\n rankLoss: 10,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Zero\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Zero\",\n desc: \"AeroCorp is one of the world's largest defense contractors. \" + \"Its leader, Steve Watataki, is thought to be a supporter of \" + \"Synthoid rights. He must be removed.

\" + \"The goal of Operation Zero is to covertly infiltrate AeroCorp and \" + \"uncover any incriminating evidence or \" + \"information against Watataki that will cause him to be removed \" + \"from his position at AeroCorp. Incriminating evidence can be \" + \"fabricated as a last resort. Be warned that AeroCorp has some of \" + \"the most advanced security measures in the world.\",\n baseDifficulty: 2500,\n reqdRank: 5e3,\n rankGain: 60,\n rankLoss: 15,\n hpLoss: 50,\n weights: {\n hack: 0.2,\n str: 0.15,\n def: 0.15,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation X\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation X\",\n desc: \"We have recently discovered an underground publication \" + \"group called Samizdat. Even though most of their publications \" + \"are nonsensical conspiracy theories, the average human is \" + \"gullible enough to believe them. Many of their works discuss \" + \"Synthoids and pose a threat to society. The publications are spreading \" + \"rapidly in China and other Eastern countries.

\" + \"Samizdat has done a good job of keeping hidden and anonymous. \" + \"However, we've just received intelligence that their base of \" + \"operations is in Ishima's underground sewer systems. Your task is to \" + \"investigate the sewer systems, and eliminate Samizdat. They must \" + \"never publish anything again.\",\n baseDifficulty: 3000,\n reqdRank: 7.5e3,\n rankGain: 75,\n rankLoss: 15,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Titan\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Titan\",\n desc: \"Several months ago Titan Laboratories' Bioengineering department \" + \"was infiltrated by Synthoids. As far as we know, Titan Laboratories' \" + \"management has no knowledge about this. We don't know what the \" + \"Synthoids are up to, but the research that they could \" + \"be conducting using Titan Laboraties' vast resources is potentially \" + \"very dangerous.

\" + \"Your goal is to enter and destroy the Bioengineering department's \" + \"facility in Aevum. The task is not just to retire the Synthoids there, but \" + \"also to destroy any information or research at the facility that \" + \"is relevant to the Synthoids and their goals.\",\n baseDifficulty: 4000,\n reqdRank: 10e3,\n rankGain: 100,\n rankLoss: 20,\n hpLoss: 100,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Ares\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ares\",\n desc: \"One of our undercover agents, Agent Carter, has informed us of a \" + \"massive weapons deal going down in Dubai between rogue Russian \" + \"militants and a radical Synthoid community. These weapons are next-gen \" + \"plasma and energy weapons. It is critical for the safety of humanity \" + \"that this deal does not happen.

\" + \"Your task is to intercept the deal. Leave no survivors.\",\n baseDifficulty: 5000,\n reqdRank: 12.5e3,\n rankGain: 125,\n rankLoss: 20,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Archangel\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Archangel\",\n desc: \"Our analysts have discovered that the popular Red Rabbit brothel in \" + \"Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence \" + \"suggests that the profit from this brothel is used to fund a large \" + \"black market arms trafficking operation.

\" + \"The goal of this operation is to take out the leaders that are running \" + \"the Red Rabbit brothel. Try to limit the number of other casualties, \" + \"but do what you must to complete the mission.\",\n baseDifficulty: 7500,\n reqdRank: 15e3,\n rankGain: 200,\n rankLoss: 20,\n hpLoss: 25,\n weights: {\n hack: 0,\n str: 0.2,\n def: 0.2,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Juggernaut\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Juggernaut\",\n desc: \"The CIA has just encountered a new security threat. A new \" + \"criminal group, lead by a shadowy operative who calls himself \" + \"Juggernaut, has been smuggling drugs and weapons (including \" + \"suspected bioweapons) into Sector-12. We also have reason \" + \"to believe the tried to break into one of Universal Energy's \" + \"facilities in order to cause a city-wide blackout. The CIA \" + \"suspects that Juggernaut is a heavily-augmented Synthoid, and \" + \"have thus enlisted our help.

\" + \"Your mission is to eradicate Juggernaut and his followers.\",\n baseDifficulty: 10e3,\n reqdRank: 20e3,\n rankGain: 300,\n rankLoss: 40,\n hpLoss: 300,\n weights: {\n hack: 0,\n str: 0.25,\n def: 0.25,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Red Dragon\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Red Dragon\",\n desc: \"The Tetrads criminal organization is suspected of \" + \"reverse-engineering the MK-VI Synthoid design. We believe \" + \"they altered and possibly improved the design and began \" + \"manufacturing their own Synthoid models in order to bolster \" + \"their criminal activities.

\" + \"Your task is to infiltrate and destroy the Tetrads' base of operations \" + \"in Los Angeles. Intelligence tells us that their base houses \" + \"one of their Synthoid manufacturing units.\",\n baseDifficulty: 12.5e3,\n reqdRank: 25e3,\n rankGain: 500,\n rankLoss: 50,\n hpLoss: 500,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation K\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation K\",\n desc: \"CODE RED SITUATION. Our intelligence tells us that VitaLife \" + \"has discovered a new android cloning technology. This technology \" + \"is supposedly capable of cloning Synthoid, not only physically \" + \"but also their advanced AI modules. We do not believe that \" + \"VitaLife is trying to use this technology illegally or \" + \"maliciously, but if any Synthoids were able to infiltrate the \" + \"corporation and take advantage of this technology then the \" + \"results would be catastrophic.

\" + \"We do not have the power or jurisdiction to shutdown this down \" + \"through legal or political means, so we must resort to a covert \" + \"operation. Your goal is to destroy this technology and eliminate \" + \"anyone who was involved in its creation.\",\n baseDifficulty: 15e3,\n reqdRank: 30e3,\n rankGain: 750,\n rankLoss: 60,\n hpLoss: 1000,\n weights: {\n hack: 0.05,\n str: 0.2,\n def: 0.2,\n dex: 0.25,\n agi: 0.25,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Deckard\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Deckard\",\n desc: \"Despite your success in eliminating VitaLife's new android-replicating \" + \"technology in Operation K, we've discovered that a small group of \" + \"MK-VI Synthoids were able to make off with the schematics and design \" + \"of the technology before the Operation. It is almost a certainty that \" + \"these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.

\" + \"The goal of Operation Deckard is to hunt down these Synthoids and retire \" + \"them. I don't need to tell you how critical this mission is.\",\n baseDifficulty: 20e3,\n reqdRank: 40e3,\n rankGain: 1e3,\n rankLoss: 75,\n hpLoss: 200,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Tyrell\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Tyrell\",\n desc: \"A week ago Blade Industries reported a small break-in at one \" + \"of their Aevum Augmentation storage facitilities. We figured out \" + \"that The Dark Army was behind the heist, and didn't think any more \" + \"of it. However, we've just discovered that several known MK-VI Synthoids \" + \"were part of that break-in group.

\" + \"We cannot have Synthoids upgrading their already-enhanced abilities \" + \"with Augmentations. Your task is to hunt down the associated Dark Army \" + \"members and eliminate them.\",\n baseDifficulty: 25e3,\n reqdRank: 50e3,\n rankGain: 1.5e3,\n rankLoss: 100,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Wallace\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Wallace\",\n desc: \"Based on information gathered from Operation Tyrell, we've discovered \" + \"that The Dark Army was well aware that there were Synthoids amongst \" + \"their ranks. Even worse, we believe that The Dark Army is working \" + \"together with other criminal organizations such as The Syndicate and \" + \"that they are planning some sort of large-scale takeover of multiple major \" + \"cities, most notably Aevum. We suspect that Synthoids have infiltrated \" + \"the ranks of these criminal factions and are trying to stage another \" + \"Synthoid uprising.

\" + \"The best way to deal with this is to prevent it before it even happens. \" + \"The goal of Operation Wallace is to destroy the Dark Army and \" + \"Syndicate factions in Aevum immediately. Leave no survivors.\",\n baseDifficulty: 30e3,\n reqdRank: 75e3,\n rankGain: 2e3,\n rankLoss: 150,\n hpLoss: 1500,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Shoulder of Orion\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Shoulder of Orion\",\n desc: \"China's Solaris Space Systems is secretly launching the first \" + \"manned spacecraft in over a decade using Synthoids. We believe \" + \"China is trying to establish the first off-world colonies.

\" + \"The mission is to prevent this launch without instigating an \" + \"international conflict. When you accept this mission you will be \" + \"officially disavowed by the NSA and the national government until after you \" + \"successfully return. In the event of failure, all of the operation's \" + \"team members must not let themselves be captured alive.\",\n baseDifficulty: 35e3,\n reqdRank: 100e3,\n rankGain: 2.5e3,\n rankLoss: 500,\n hpLoss: 1500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation Hyron\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Hyron\",\n desc: \"Our intelligence tells us that Fulcrum Technologies is developing \" + \"a quantum supercomputer using human brains as core \" + \"processors. This supercomputer \" + \"is rumored to be able to store vast amounts of data and \" + \"perform computations unmatched by any other supercomputer on the \" + \"planet. But more importantly, the use of organic human brains \" + \"means that the supercomputer may be able to reason abstractly \" + \"and become self-aware.

\" + \"I do not need to remind you why sentient-level AIs pose a serious \" + \"threat to all of mankind.

\" + \"The research for this project is being conducted at one of Fulcrum \" + \"Technologies secret facilities in Aevum, codenamed 'Alpha Ranch'. \" + \"Infiltrate the compound, delete and destroy the work, and then find and kill the \" + \"project lead.\",\n baseDifficulty: 40e3,\n reqdRank: 125e3,\n rankGain: 3e3,\n rankLoss: 1e3,\n hpLoss: 500,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Morpheus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Morpheus\",\n desc: \"DreamSense Technologies is an advertising company that uses \" + \"special technology to transmit their ads into the peoples \" + \"dreams and subconcious. They do this using broadcast transmitter \" + \"towers. Based on information from our agents and informants in \" + \"Chonqging, we have reason to believe that one of the broadcast \" + \"towers there has been compromised by Synthoids and is being used \" + \"to spread pro-Synthoid propaganda.

\" + \"The mission is to destroy this broadcast tower. Speed and \" + \"stealth are of the upmost important for this.\",\n baseDifficulty: 45e3,\n reqdRank: 150e3,\n rankGain: 4e3,\n rankLoss: 1e3,\n hpLoss: 100,\n weights: {\n hack: 0.05,\n str: 0.15,\n def: 0.15,\n dex: 0.3,\n agi: 0.3,\n cha: 0,\n int: 0.05\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isStealth: true\n });\n BlackOperations[\"Operation Ion Storm\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ion Storm\",\n desc: \"Our analysts have uncovered a gathering of MK-VI Synthoids \" + \"that have taken up residence in the Sector-12 Slums. We \" + \"don't know if they are rogue Synthoids from the Uprising, \" + \"but we do know that they have been stockpiling \" + \"weapons, money, and other resources. This makes them dangerous.

\" + \"This is a full-scale assault operation to find and retire all of these \" + \"Synthoids in the Sector-12 Slums.\",\n baseDifficulty: 50e3,\n reqdRank: 175e3,\n rankGain: 5e3,\n rankLoss: 1e3,\n hpLoss: 5000,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Annihilus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Annihilus\",\n desc: \"Our superiors have ordered us to eradicate everything and everyone \" + \"in an underground facility located in Aevum. They tell us \" + \"that the facility houses many dangerous Synthoids and \" + \"belongs to a terrorist organization called \" + \"'The Covenant'. We have no prior intelligence about this \" + \"organization, so you are going in blind.\",\n baseDifficulty: 55e3,\n reqdRank: 200e3,\n rankGain: 7.5e3,\n rankLoss: 1e3,\n hpLoss: 10e3,\n weights: {\n hack: 0,\n str: 0.24,\n def: 0.24,\n dex: 0.24,\n agi: 0.24,\n cha: 0,\n int: 0.04\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Ultron\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Ultron\",\n desc: \"OmniTek Incorporated, the original designer and manufacturer of Synthoids, \" + \"has notified us of a malfunction in their AI design. This malfunction, \" + \"when triggered, causes MK-VI Synthoids to become radicalized and seek out \" + \"the destruction of humanity. They say that this bug affects all MK-VI Synthoids, \" + \"not just the rogue ones from the Uprising.

\" + \"OmniTek has also told us they they believe someone has triggered this \" + \"malfunction in a large group of MK-VI Synthoids, and that these newly-radicalized Synthoids \" + \"are now amassing in Volhaven to form a terrorist group called Ultron.

\" + \"Intelligence suggests Ultron is heavily armed and that their members are \" + \"augmented. We believe Ultron is making moves to take control of \" + \"and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).

\" + \"Your task is to find and destroy Ultron.\",\n baseDifficulty: 60e3,\n reqdRank: 250e3,\n rankGain: 10e3,\n rankLoss: 2e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n },\n isKill: true\n });\n BlackOperations[\"Operation Centurion\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Centurion\",\n desc: \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

\" + \"Throughout all of humanity's history, we have relied on \" + \"technology to survive, conquer, and progress. Its advancement became our primary goal. \" + \"And at the peak of human civilization technology turned into \" + \"power. Global, absolute power.

\" + \"It seems that the universe is not without a sense of irony.

\" + \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\",\n baseDifficulty: 70e3,\n reqdRank: 300e3,\n rankGain: 15e3,\n rankLoss: 5e3,\n hpLoss: 10e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n BlackOperations[\"Operation Vindictus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Vindictus\",\n desc: \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

\" + \"The bits are all around us. The daemons that hold the Node \" + \"together can manifest themselves in many different ways.

\" + \"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\",\n baseDifficulty: 75e3,\n reqdRank: 350e3,\n rankGain: 20e3,\n rankLoss: 20e3,\n hpLoss: 20e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n BlackOperations[\"Operation Daedalus\"] = new _BlackOperation__WEBPACK_IMPORTED_MODULE_0__[/* BlackOperation */ \"a\"]({\n name: \"Operation Daedalus\",\n desc: \"Yesterday we obeyed kings and bent our neck to emperors. \" + \"Today we kneel only to truth.\",\n baseDifficulty: 80e3,\n reqdRank: 400e3,\n rankGain: 40e3,\n rankLoss: 10e3,\n hpLoss: 100e3,\n weights: {\n hack: 0.1,\n str: 0.2,\n def: 0.2,\n dex: 0.2,\n agi: 0.2,\n cha: 0,\n int: 0.1\n },\n decays: {\n hack: 0.6,\n str: 0.8,\n def: 0.8,\n dex: 0.8,\n agi: 0.8,\n cha: 0,\n int: 0.75\n }\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/BlackOperations.ts?"); /***/ }), -/* 200 */ +/* 201 */ /*!*******************************************!*\ !*** ./src/Bladeburner/GeneralActions.ts ***! \*******************************************/ @@ -1686,8 +1698,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActions; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n\nconst GeneralActions = {};\n\n(function () {\n // General Actions\n let actionName;\n actionName = \"Training\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve your abilities at the Bladeburner unit's specialized training \" + \"center. Doing this gives experience for all combat stats and also \" + \"increases your max stamina.\"\n });\n actionName = \"Field Analysis\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Mine and analyze Synthoid-related data. This improves the \" + \"Bladeburner's unit intelligence on Synthoid locations and \" + \"activities. Completing this action will improve the accuracy \" + \"of your Synthoid population estimated in the current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Recruitment\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Attempt to recruit members for your Bladeburner team. These members \" + \"can help you conduct operations.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Diplomacy\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Improve diplomatic relations with the Synthoid population. \" + \"Completing this action will reduce the Chaos level in your current city.

\" + \"Does NOT require stamina.\"\n });\n actionName = \"Hyperbolic Regeneration Chamber\";\n GeneralActions[actionName] = new _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"]({\n name: actionName,\n desc: \"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. \" + \"This will slowly heal your wounds and slightly increase your stamina.

\"\n });\n})();\n\n//# sourceURL=webpack:///./src/Bladeburner/GeneralActions.ts?"); /***/ }), -/* 201 */, -/* 202 */ +/* 202 */, +/* 203 */ /*!**************************************!*\ !*** ./src/SourceFile/SourceFile.ts ***! \**************************************/ @@ -1699,13 +1711,13 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFile; });\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass SourceFile {\n constructor(number, info = \"\") {\n _defineProperty(this, \"lvl\", 1);\n\n _defineProperty(this, \"owned\", false);\n\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_0__[/* BitNodes */ \"a\"][bitnodeKey];\n\n if (bitnode == null) {\n throw new Error(\"Invalid Bit Node for this Source File\");\n }\n\n this.n = number;\n this.name = `Source-File ${number}: ${bitnode.name}`;\n this.info = info;\n }\n\n}\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFile.ts?"); /***/ }), -/* 203 */, /* 204 */, /* 205 */, /* 206 */, /* 207 */, /* 208 */, -/* 209 */ +/* 209 */, +/* 210 */ /*!*******************************************!*\ !*** ./utils/uiHelpers/getElementById.ts ***! \*******************************************/ @@ -1717,8 +1729,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getElementById; });\n/**\n * Returns a reference to the first object with the specified value of the ID or NAME attribute,\n * throwing an error if it is unable to find it.\n * @param elementId The HTML ID to retrieve the element by.\n * @throws {Error} When the 'elementId' cannot be found.\n */\nfunction getElementById(elementId) {\n const el = document.getElementById(elementId);\n\n if (el === null) {\n throw new Error(`Unable to find element with id '${elementId}'`);\n }\n\n return el;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/getElementById.ts?"); /***/ }), -/* 210 */, -/* 211 */ +/* 211 */, +/* 212 */ /*!**********************************************!*\ !*** ./utils/uiHelpers/removeElementById.ts ***! \**********************************************/ @@ -1727,10 +1739,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeElementById; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 209);\n/* harmony import */ var _removeElement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElement */ 341);\n\n\n/**\n * Given its id, this function removes an element AND its children\n * @param id The HTML identifier to search for and remove.\n */\n\nfunction removeElementById(id) {\n try {\n const elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(id);\n Object(_removeElement__WEBPACK_IMPORTED_MODULE_1__[/* removeElement */ \"a\"])(elem);\n } catch (e) {// Probably should log this as we're trying to remove elements that don't exist.\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeElementById.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeElementById; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n/* harmony import */ var _removeElement__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElement */ 343);\n\n\n/**\n * Given its id, this function removes an element AND its children\n * @param id The HTML identifier to search for and remove.\n */\n\nfunction removeElementById(id) {\n try {\n const elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(id);\n Object(_removeElement__WEBPACK_IMPORTED_MODULE_1__[/* removeElement */ \"a\"])(elem);\n } catch (e) {// Probably should log this as we're trying to remove elements that don't exist.\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeElementById.ts?"); /***/ }), -/* 212 */ +/* 213 */ /*!************************************************************!*\ !*** ./src/Netscript/WorkerScriptStartStopEventEmitter.ts ***! \************************************************************/ @@ -1739,10 +1751,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptStartStopEventEmitter; });\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/EventEmitter */ 342);\n/**\n * Event emitter that triggers when scripts are started/stopped\n */\n\nconst WorkerScriptStartStopEventEmitter = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptStartStopEventEmitter; });\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/EventEmitter */ 344);\n/**\n * Event emitter that triggers when scripts are started/stopped\n */\n\nconst WorkerScriptStartStopEventEmitter = new _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_0__[/* EventEmitter */ \"a\"]();\n\n//# sourceURL=webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts?"); /***/ }), -/* 213 */ +/* 214 */ /*!**************************!*\ !*** ./utils/LogBox.tsx ***! \**************************/ @@ -1751,11 +1763,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return logBoxCreate; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/Netscript/killWorkerScript */ 102);\n/* harmony import */ var _uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uiHelpers/createElement */ 113);\n/* harmony import */ var _uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uiHelpers/removeElementById */ 211);\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})();\n\nfunction ScriptLogPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function close() {\n const content = document.getElementById(props.id);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unmountComponentAtNode(content);\n Object(_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(props.id);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function closeHandler(event) {\n if (event.keyCode === 27) {\n close();\n }\n }\n\n document.addEventListener(\"keydown\", closeHandler);\n return () => {\n document.removeEventListener(\"keydown\", closeHandler);\n };\n }, []);\n\n function kill() {\n Object(_src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__[/* killWorkerScript */ \"a\"])(props.script, props.script.server, true);\n close();\n }\n\n function drag(event) {\n event.preventDefault();\n let x = event.clientX;\n let y = event.clientY;\n let left = props.container.offsetLeft + props.container.clientWidth / 2;\n let top = props.container.offsetTop + props.container.clientWidth / 5;\n\n function mouseMove(event) {\n left += event.clientX - x;\n top += event.clientY - y;\n props.container.style.left = left + \"px\";\n props.container.style.top = top + \"px\"; // reset right and bottom to avoid the window stretching\n\n props.container.style.right = \"\";\n props.container.style.bottom = \"\";\n x = event.clientX;\n y = event.clientY;\n }\n\n function mouseUp() {\n document.removeEventListener(\"mouseup\", mouseUp);\n document.removeEventListener(\"mousemove\", mouseMove);\n }\n\n document.addEventListener(\"mouseup\", mouseUp);\n document.addEventListener(\"mousemove\", mouseMove);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-header\",\n onMouseDown: drag\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.filename, \" \", props.script.args.map(x => `${x}`).join(\" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: kill\n }, \"Kill Script\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: close\n }, \"Close\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-log-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.logs.map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n style: {\n whiteSpace: \"pre-line\"\n }\n }, line, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))))));\n}\n\nfunction logBoxCreate(script) {\n const id = script.server + \"-\" + script.filename + script.args.map(x => `${x}`).join(\"-\");\n if (document.getElementById(id) !== null) return;\n const container = Object(_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"log-box-container\",\n id: id\n });\n gameContainer.appendChild(container);\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScriptLogPopup, {\n script: script,\n id: id,\n container: container\n }), container);\n}\n\n//# sourceURL=webpack:///./utils/LogBox.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return logBoxCreate; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../src/Netscript/killWorkerScript */ 103);\n/* harmony import */ var _uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./uiHelpers/createElement */ 113);\n/* harmony import */ var _uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./uiHelpers/removeElementById */ 212);\n\n\n\n\n\nlet gameContainer;\n\n(function () {\n function getGameContainer() {\n const container = document.getElementById(\"entire-game-container\");\n\n if (container == null) {\n throw new Error(`Failed to find game container DOM element`);\n }\n\n gameContainer = container;\n document.removeEventListener(\"DOMContentLoaded\", getGameContainer);\n }\n\n document.addEventListener(\"DOMContentLoaded\", getGameContainer);\n})();\n\nfunction ScriptLogPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function close() {\n const content = document.getElementById(props.id);\n if (content == null) return;\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.unmountComponentAtNode(content);\n Object(_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_4__[/* removeElementById */ \"a\"])(props.id);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function closeHandler(event) {\n if (event.keyCode === 27) {\n close();\n }\n }\n\n document.addEventListener(\"keydown\", closeHandler);\n return () => {\n document.removeEventListener(\"keydown\", closeHandler);\n };\n }, []);\n\n function kill() {\n Object(_src_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_2__[/* killWorkerScript */ \"a\"])(props.script, props.script.server, true);\n close();\n }\n\n function drag(event) {\n event.preventDefault();\n let x = event.clientX;\n let y = event.clientY;\n let left = props.container.offsetLeft + props.container.clientWidth / 2;\n let top = props.container.offsetTop + props.container.clientWidth / 5;\n\n function mouseMove(event) {\n left += event.clientX - x;\n top += event.clientY - y;\n props.container.style.left = left + \"px\";\n props.container.style.top = top + \"px\"; // reset right and bottom to avoid the window stretching\n\n props.container.style.right = \"\";\n props.container.style.bottom = \"\";\n x = event.clientX;\n y = event.clientY;\n }\n\n function mouseUp() {\n document.removeEventListener(\"mouseup\", mouseUp);\n document.removeEventListener(\"mousemove\", mouseMove);\n }\n\n document.addEventListener(\"mouseup\", mouseUp);\n document.addEventListener(\"mousemove\", mouseMove);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-header\",\n onMouseDown: drag\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.filename, \" \", props.script.args.map(x => `${x}`).join(\" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: kill\n }, \"Kill Script\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"log-box-button\",\n onClick: close\n }, \"Close\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"log-box-log-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.script.logs.map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n style: {\n whiteSpace: \"pre-line\"\n }\n }, line, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))))));\n}\n\nfunction logBoxCreate(script) {\n const id = script.server + \"-\" + script.filename + script.args.map(x => `${x}`).join(\"-\");\n if (document.getElementById(id) !== null) return;\n const container = Object(_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"div\", {\n class: \"log-box-container\",\n id: id\n });\n gameContainer.appendChild(container);\n react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.render(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ScriptLogPopup, {\n script: script,\n id: id,\n container: container\n }), container);\n}\n\n//# sourceURL=webpack:///./utils/LogBox.tsx?"); /***/ }), -/* 214 */, -/* 215 */ +/* 215 */, +/* 216 */ /*!****************************************!*\ !*** ./src/Bladeburner/data/Icons.tsx ***! \****************************************/ @@ -1767,7 +1779,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return stealthIcon; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killIcon; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nconst stealthIcon = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16px\",\n height: \"16px\",\n viewBox: \"0 0 166 132\",\n style: {\n fill: \"#adff2f\"\n }\n}, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"g\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M132.658-0.18l-24.321,24.321c-7.915-2.71-16.342-4.392-25.087-4.392c-45.84,0-83,46-83,46 s14.1,17.44,35.635,30.844L12.32,120.158l12.021,12.021L144.68,11.841L132.658-0.18z M52.033,80.445 c-2.104-4.458-3.283-9.438-3.283-14.695c0-19.054,15.446-34.5,34.5-34.5c5.258,0,10.237,1.179,14.695,3.284L52.033,80.445z\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"M134.865,37.656l-18.482,18.482c0.884,3.052,1.367,6.275,1.367,9.612c0,19.055-15.446,34.5-34.5,34.5 c-3.337,0-6.56-0.483-9.611-1.367l-10.124,10.124c6.326,1.725,12.934,2.743,19.735,2.743c45.84,0,83-46,83-46 S153.987,50.575,134.865,37.656z\"\n})));\nconst killIcon = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n width: \"16px\",\n height: \"16px\",\n viewBox: \"-22 0 511 511.99561\",\n style: {\n fill: \"#adff2f\"\n }\n}, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0\"\n}), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"path\", {\n d: \"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0\"\n}));\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Icons.tsx?"); /***/ }), -/* 216 */ +/* 217 */ /*!*************************************!*\ !*** ./src/Hacknet/HashUpgrades.ts ***! \*************************************/ @@ -1779,7 +1791,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgrades; });\n/* harmony import */ var _HashUpgrade__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HashUpgrade */ 658);\n/* harmony import */ var _data_HashUpgradesMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/HashUpgradesMetadata */ 659);\n/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\n\n\nconst HashUpgrades = {};\n\nfunction createHashUpgrade(p) {\n HashUpgrades[p.name] = new _HashUpgrade__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrade */ \"a\"](p);\n}\n\nfor (const metadata of _data_HashUpgradesMetadata__WEBPACK_IMPORTED_MODULE_1__[/* HashUpgradesMetadata */ \"a\"]) {\n createHashUpgrade(metadata);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/HashUpgrades.ts?"); /***/ }), -/* 217 */ +/* 218 */ /*!****************************************!*\ !*** ./utils/helpers/arrayToString.ts ***! \****************************************/ @@ -1791,7 +1803,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return arrayToString; });\n/**\n * Returns the input array as a comma separated string.\n *\n * Does several things that Array.toString() doesn't do\n * - Adds brackets around the array\n * - Adds quotation marks around strings\n */\nfunction arrayToString(a) {\n const vals = [];\n\n for (let i = 0; i < a.length; ++i) {\n let elem = a[i];\n\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/arrayToString.ts?"); /***/ }), -/* 218 */ +/* 219 */ /*!****************************!*\ !*** ./src/SaveObject.jsx ***! \****************************/ @@ -1800,10 +1812,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return saveObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return loadGame; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 87);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf/Fconf */ 311);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf/FconfSettings */ 67);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/createStatusText */ 476);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ExportBonus */ 247);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 286);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nlet saveObject = new BitburnerSaveObject();\n\nfunction BitburnerSaveObject() {\n this.PlayerSave = \"\";\n this.AllServersSave = \"\";\n this.CompaniesSave = \"\";\n this.FactionsSave = \"\";\n this.SpecialServerIpsSave = \"\";\n this.AliasesSave = \"\";\n this.GlobalAliasesSave = \"\";\n this.MessagesSave = \"\";\n this.StockMarketSave = \"\";\n this.SettingsSave = \"\";\n this.FconfSettingsSave = \"\";\n this.VersionSave = \"\";\n this.AllGangsSave = \"\";\n this.LastExportBonus = \"\";\n}\n\nBitburnerSaveObject.prototype.getSaveString = function () {\n this.PlayerSave = JSON.stringify(_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"]); // Delete all logs from all running scripts\n\n var TempAllServers = JSON.parse(JSON.stringify(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* AllServers */ \"b\"]), _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n for (var ip in TempAllServers) {\n var server = TempAllServers[ip];\n\n if (server == null) {\n continue;\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n var runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n this.AllServersSave = JSON.stringify(TempAllServers);\n this.CompaniesSave = JSON.stringify(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]);\n this.FactionsSave = JSON.stringify(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"]);\n this.SpecialServerIpsSave = JSON.stringify(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"]);\n this.AliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* Aliases */ \"a\"]);\n this.GlobalAliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* GlobalAliases */ \"b\"]);\n this.MessagesSave = JSON.stringify(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* Messages */ \"a\"]);\n this.StockMarketSave = JSON.stringify(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"]);\n this.SettingsSave = JSON.stringify(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"]);\n this.FconfSettingsSave = JSON.stringify(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__[/* FconfSettings */ \"a\"]);\n this.VersionSave = JSON.stringify(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version);\n this.LastExportBonus = JSON.stringify(_ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* LastExportBonus */ \"a\"]);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang()) {\n this.AllGangsSave = JSON.stringify(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* AllGangs */ \"a\"]);\n }\n\n var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n return saveString;\n};\n\nBitburnerSaveObject.prototype.saveGame = function (db) {\n var saveString = this.getSaveString(); // We'll save to both localstorage and indexedDb\n\n var objectStore = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\");\n var request = objectStore.put(saveString, \"save\");\n\n request.onerror = function (e) {\n console.error(\"Error saving game to IndexedDB: \" + e);\n };\n\n try {\n window.localStorage.setItem(\"bitburnerSave\", saveString);\n } catch (e) {\n if (e.code == 22) {\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Save failed for localStorage! Check console(F12)\");\n console.error(\"Failed to save game to localStorage because the size of the save file \" + \"is too large. However, the game will still be saved to IndexedDb if your browser \" + \"supports it. If you would like to save to localStorage as well, then \" + \"consider killing several of your scripts to \" + \"fix this, or increasing the size of your browsers localStorage\");\n }\n }\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game saved!\");\n}; // Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\n\n\nfunction evaluateVersionCompatibility(ver) {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && typeof _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"string\") {\n console.log(\"Changed Player.companyPosition value to be compatible with v0.41.2\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition.data.positionName;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition == null) {\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = \"\";\n }\n } // The \"companyName\" property of all Companies is renamed to \"name\"\n\n\n for (var companyName in _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"][companyName];\n\n if ((company.name == null || company.name === 0 || company.name === \"\") && company.companyName != null) {\n console.log(\"Changed company name property to be compatible with v0.41.2\");\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n console.log(\"Changed company companyPositions property to be compatible with v0.41.2\");\n const pos = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n\n company.companyPositions = pos;\n }\n }\n } // This version allowed players to hold multiple jobs\n\n\n if (ver < \"0.43.0\") {\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName !== \"\" && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"\") {\n console.log(\"Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].jobs[_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName] = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n\n delete _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n}\n\nfunction loadGame(saveString) {\n if (saveString === \"\" || saveString == null || saveString === undefined) {\n if (!window.localStorage.getItem(\"bitburnerSave\")) {\n console.log(\"No save file to load\");\n return false;\n }\n\n saveString = decodeURIComponent(escape(atob(window.localStorage.getItem(\"bitburnerSave\"))));\n console.log(\"Loading game from localStorage\");\n } else {\n saveString = decodeURIComponent(escape(atob(saveString)));\n console.log(\"Loading game from IndexedDB\");\n }\n\n var saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse .fconf Settings.\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n return true;\n}\n\nfunction loadImportedGame(saveObj, saveString) {\n var tempSaveObj = null;\n var tempPlayer = null; // Check to see if the imported save file can be parsed. If any\n // errors are caught it will fail\n\n try {\n var decodedSaveString = decodeURIComponent(escape(atob(saveString)));\n tempSaveObj = JSON.parse(decodedSaveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n tempPlayer = JSON.parse(tempSaveObj.PlayerSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n tempPlayer.money = new decimal_js__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"](tempPlayer.money);\n JSON.parse(tempSaveObj.AllServersSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.CompaniesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.FactionsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.SpecialServerIpsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n if (tempSaveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"GlobalAliases\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Global Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n JSON.parse(tempSaveObj.MessagesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Messages save failed: ${e}`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n JSON.parse(tempSaveObj.StockMarketSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing StockMarket save failed: ${e}`);\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(tempSaveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n } catch (e) {\n console.error(\"Parsing Version save failed: \" + e);\n }\n }\n\n if (tempPlayer.inGang() && tempSaveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(tempSaveObj.AllGangsSave);\n } catch (e) {\n console.error(`Failed to parse AllGangsSave: {e}`);\n throw e;\n }\n }\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Error importing game: \" + e.toString());\n return false;\n } // Since the save file is valid, load everything for real\n\n\n saveString = decodeURIComponent(escape(atob(saveString)));\n saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to load .fconf settings when importing\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n saveObject.saveGame(_engine__WEBPACK_IMPORTED_MODULE_3__[\"Engine\"].indexedDb);\n location.reload();\n return true;\n}\n\nBitburnerSaveObject.prototype.exportGame = function () {\n const saveString = this.getSaveString(); // Save file name is based on current timestamp and BitNode\n\n const epochTime = Math.round(Date.now() / 1000);\n const bn = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].bitNodeN;\n const filename = `bitburnerSave_BN${bn}x${_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__[/* SourceFileFlags */ \"a\"][bn]}_${epochTime}.json`;\n var file = new Blob([saveString], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n var a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n};\n\nBitburnerSaveObject.prototype.importGame = function () {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var fileSelector = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__[/* clearEventListeners */ \"a\"])(\"import-game-file-selector\");\n fileSelector.addEventListener(\"change\", openImportFileHandler, false);\n $(\"#import-game-file-selector\").click();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"ERR: Your browser does not support HTML5 File API. Cannot import.\");\n }\n};\n\nBitburnerSaveObject.prototype.deleteGame = function (db) {\n // Delete from local storage\n if (window.localStorage.getItem(\"bitburnerSave\")) {\n window.localStorage.removeItem(\"bitburnerSave\");\n } // Delete from indexedDB\n\n\n var request = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\").delete(\"save\");\n\n request.onsuccess = function () {\n console.log(\"Successfully deleted save from indexedDb\");\n };\n\n request.onerror = function (e) {\n console.error(`Failed to delete save from indexedDb: ${e}`);\n };\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game deleted!\");\n};\n\nfunction createNewUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"New update!
\" + \"Please report any bugs/issues through the github repository \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nfunction createBetaUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"You are playing on the beta environment! This branch of the game \" + \"features the latest developments in the game. This version may be unstable.
\" + \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nBitburnerSaveObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_toJSON */ \"b\"])(\"BitburnerSaveObject\", this);\n};\n\nBitburnerSaveObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_fromJSON */ \"a\"])(BitburnerSaveObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"].constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nfunction openImportFileHandler(evt) {\n var file = evt.target.files[0];\n\n if (!file) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Invalid file selected\");\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function (e) {\n var contents = e.target.result;\n loadImportedGame(saveObject, contents);\n };\n\n reader.readAsText(file);\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/SaveObject.jsx?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return saveObject; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return loadGame; });\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Alias */ 87);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Fconf/Fconf */ 313);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Fconf/FconfSettings */ 67);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ui/createStatusText */ 476);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ExportBonus */ 247);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var _utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../utils/uiHelpers/clearEventListeners */ 287);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nlet saveObject = new BitburnerSaveObject();\n\nfunction BitburnerSaveObject() {\n this.PlayerSave = \"\";\n this.AllServersSave = \"\";\n this.CompaniesSave = \"\";\n this.FactionsSave = \"\";\n this.SpecialServerIpsSave = \"\";\n this.AliasesSave = \"\";\n this.GlobalAliasesSave = \"\";\n this.MessagesSave = \"\";\n this.StockMarketSave = \"\";\n this.SettingsSave = \"\";\n this.FconfSettingsSave = \"\";\n this.VersionSave = \"\";\n this.AllGangsSave = \"\";\n this.LastExportBonus = \"\";\n}\n\nBitburnerSaveObject.prototype.getSaveString = function () {\n this.PlayerSave = JSON.stringify(_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"]); // Delete all logs from all running scripts\n\n var TempAllServers = JSON.parse(JSON.stringify(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* AllServers */ \"b\"]), _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n for (var ip in TempAllServers) {\n var server = TempAllServers[ip];\n\n if (server == null) {\n continue;\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n var runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n this.AllServersSave = JSON.stringify(TempAllServers);\n this.CompaniesSave = JSON.stringify(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]);\n this.FactionsSave = JSON.stringify(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* Factions */ \"a\"]);\n this.SpecialServerIpsSave = JSON.stringify(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"]);\n this.AliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* Aliases */ \"a\"]);\n this.GlobalAliasesSave = JSON.stringify(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* GlobalAliases */ \"b\"]);\n this.MessagesSave = JSON.stringify(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* Messages */ \"a\"]);\n this.StockMarketSave = JSON.stringify(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* StockMarket */ \"a\"]);\n this.SettingsSave = JSON.stringify(_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"]);\n this.FconfSettingsSave = JSON.stringify(_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_6__[/* FconfSettings */ \"a\"]);\n this.VersionSave = JSON.stringify(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version);\n this.LastExportBonus = JSON.stringify(_ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* LastExportBonus */ \"a\"]);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang()) {\n this.AllGangsSave = JSON.stringify(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* AllGangs */ \"a\"]);\n }\n\n var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n return saveString;\n};\n\nBitburnerSaveObject.prototype.saveGame = function (db) {\n var saveString = this.getSaveString(); // We'll save to both localstorage and indexedDb\n\n var objectStore = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\");\n var request = objectStore.put(saveString, \"save\");\n\n request.onerror = function (e) {\n console.error(\"Error saving game to IndexedDB: \" + e);\n };\n\n try {\n window.localStorage.setItem(\"bitburnerSave\", saveString);\n } catch (e) {\n if (e.code == 22) {\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Save failed for localStorage! Check console(F12)\");\n console.error(\"Failed to save game to localStorage because the size of the save file \" + \"is too large. However, the game will still be saved to IndexedDb if your browser \" + \"supports it. If you would like to save to localStorage as well, then \" + \"consider killing several of your scripts to \" + \"fix this, or increasing the size of your browsers localStorage\");\n }\n }\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game saved!\");\n}; // Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\n\n\nfunction evaluateVersionCompatibility(ver) {\n // This version refactored the Company/job-related code\n if (ver <= \"0.41.2\") {\n // Player's company position is now a string\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && typeof _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"string\") {\n console.log(\"Changed Player.companyPosition value to be compatible with v0.41.2\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition.data.positionName;\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition == null) {\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition = \"\";\n }\n } // The \"companyName\" property of all Companies is renamed to \"name\"\n\n\n for (var companyName in _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"]) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* Companies */ \"a\"][companyName];\n\n if ((company.name == null || company.name === 0 || company.name === \"\") && company.companyName != null) {\n console.log(\"Changed company name property to be compatible with v0.41.2\");\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n console.log(\"Changed company companyPositions property to be compatible with v0.41.2\");\n const pos = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n\n company.companyPositions = pos;\n }\n }\n } // This version allowed players to hold multiple jobs\n\n\n if (ver < \"0.43.0\") {\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName !== \"\" && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition != null && _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition !== \"\") {\n console.log(\"Copied player's companyName and companyPosition properties to the Player.jobs map for v0.43.0\");\n _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].jobs[_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyName] = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n\n delete _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].companyPosition;\n }\n}\n\nfunction loadGame(saveString) {\n if (saveString === \"\" || saveString == null || saveString === undefined) {\n if (!window.localStorage.getItem(\"bitburnerSave\")) {\n console.log(\"No save file to load\");\n return false;\n }\n\n saveString = decodeURIComponent(escape(atob(window.localStorage.getItem(\"bitburnerSave\"))));\n console.log(\"Loading game from localStorage\");\n } else {\n saveString = decodeURIComponent(escape(atob(saveString)));\n console.log(\"Loading game from IndexedDB\");\n }\n\n var saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse .fconf Settings.\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n return true;\n}\n\nfunction loadImportedGame(saveObj, saveString) {\n var tempSaveObj = null;\n var tempPlayer = null; // Check to see if the imported save file can be parsed. If any\n // errors are caught it will fail\n\n try {\n var decodedSaveString = decodeURIComponent(escape(atob(saveString)));\n tempSaveObj = JSON.parse(decodedSaveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n tempPlayer = JSON.parse(tempSaveObj.PlayerSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]); // Parse Decimal.js objects\n\n tempPlayer.money = new decimal_js__WEBPACK_IMPORTED_MODULE_21__[/* default */ \"a\"](tempPlayer.money);\n JSON.parse(tempSaveObj.AllServersSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.CompaniesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.FactionsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n JSON.parse(tempSaveObj.SpecialServerIpsSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n\n if (tempSaveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"GlobalAliases\")) {\n try {\n JSON.parse(tempSaveObj.AliasesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Global Aliases save failed: ${e}`);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n JSON.parse(tempSaveObj.MessagesSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing Messages save failed: ${e}`);\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n JSON.parse(tempSaveObj.StockMarketSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n } catch (e) {\n console.error(`Parsing StockMarket save failed: ${e}`);\n }\n }\n\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n _ExportBonus__WEBPACK_IMPORTED_MODULE_17__[/* setLastExportBonus */ \"d\"](new Date().getTime());\n console.error(\"ERROR: Failed to parse .fconf Settings \" + err);\n }\n }\n\n if (tempSaveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(tempSaveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n } catch (e) {\n console.error(\"Parsing Version save failed: \" + e);\n }\n }\n\n if (tempPlayer.inGang() && tempSaveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(tempSaveObj.AllGangsSave);\n } catch (e) {\n console.error(`Failed to parse AllGangsSave: {e}`);\n throw e;\n }\n }\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Error importing game: \" + e.toString());\n return false;\n } // Since the save file is valid, load everything for real\n\n\n saveString = decodeURIComponent(escape(atob(saveString)));\n saveObj = JSON.parse(saveString, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n Object(_Player__WEBPACK_IMPORTED_MODULE_9__[/* loadPlayer */ \"b\"])(saveObj.PlayerSave);\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_10__[/* loadAllServers */ \"f\"])(saveObj.AllServersSave);\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_1__[/* loadCompanies */ \"c\"])(saveObj.CompaniesSave);\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_4__[/* loadFactions */ \"d\"])(saveObj.FactionsSave);\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* loadSpecialServerIps */ \"d\"])(saveObj.SpecialServerIpsSave);\n\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(saveObj.AliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadAliases */ \"c\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(saveObj.GlobalAliasesSave);\n } catch (e) {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n } else {\n Object(_Alias__WEBPACK_IMPORTED_MODULE_0__[/* loadGlobalAliases */ \"d\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* loadMessages */ \"d\"])(saveObj.MessagesSave);\n } catch (e) {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n } else {\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_8__[/* initMessages */ \"c\"])();\n }\n\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(saveObj.StockMarketSave);\n } catch (e) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_14__[/* loadStockMarket */ \"i\"])(\"\");\n }\n\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].load(saveObj.SettingsSave);\n } catch (e) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n } else {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].init();\n }\n\n if (saveObj.hasOwnProperty(\"FconfSettingsSave\")) {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_5__[/* loadFconf */ \"b\"])(saveObj.FconfSettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to load .fconf settings when importing\");\n }\n }\n\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n var ver = JSON.parse(saveObj.VersionSave, _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"]);\n evaluateVersionCompatibility(ver);\n\n if (ver != _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].Version) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_7__[/* loadAllGangs */ \"b\"])(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n\n saveObject.saveGame(_engine__WEBPACK_IMPORTED_MODULE_3__[\"Engine\"].indexedDb);\n location.reload();\n return true;\n}\n\nBitburnerSaveObject.prototype.exportGame = function () {\n const saveString = this.getSaveString(); // Save file name is based on current timestamp and BitNode\n\n const epochTime = Math.round(Date.now() / 1000);\n const bn = _Player__WEBPACK_IMPORTED_MODULE_9__[/* Player */ \"a\"].bitNodeN;\n const filename = `bitburnerSave_BN${bn}x${_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_13__[/* SourceFileFlags */ \"a\"][bn]}_${epochTime}.json`;\n var file = new Blob([saveString], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n var a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_16__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n};\n\nBitburnerSaveObject.prototype.importGame = function () {\n if (window.File && window.FileReader && window.FileList && window.Blob) {\n var fileSelector = Object(_utils_uiHelpers_clearEventListeners__WEBPACK_IMPORTED_MODULE_19__[/* clearEventListeners */ \"a\"])(\"import-game-file-selector\");\n fileSelector.addEventListener(\"change\", openImportFileHandler, false);\n $(\"#import-game-file-selector\").click();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"ERR: Your browser does not support HTML5 File API. Cannot import.\");\n }\n};\n\nBitburnerSaveObject.prototype.deleteGame = function (db) {\n // Delete from local storage\n if (window.localStorage.getItem(\"bitburnerSave\")) {\n window.localStorage.removeItem(\"bitburnerSave\");\n } // Delete from indexedDB\n\n\n var request = db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\").delete(\"save\");\n\n request.onsuccess = function () {\n console.log(\"Successfully deleted save from indexedDb\");\n };\n\n request.onerror = function (e) {\n console.error(`Failed to delete save from indexedDb: ${e}`);\n };\n\n Object(_ui_createStatusText__WEBPACK_IMPORTED_MODULE_15__[/* createStatusText */ \"a\"])(\"Game deleted!\");\n};\n\nfunction createNewUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"New update!
\" + \"Please report any bugs/issues through the github repository \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nfunction createBetaUpdateText() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"You are playing on the beta environment! This branch of the game \" + \"features the latest developments in the game. This version may be unstable.
\" + \"Please report any bugs/issues through the github repository (https://github.com/danielyxie/bitburner/issues) \" + \"or the Bitburner subreddit (reddit.com/r/bitburner).

\" + _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].LatestUpdate);\n}\n\nBitburnerSaveObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_toJSON */ \"b\"])(\"BitburnerSaveObject\", this);\n};\n\nBitburnerSaveObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Generic_fromJSON */ \"a\"])(BitburnerSaveObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_20__[/* Reviver */ \"c\"].constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nfunction openImportFileHandler(evt) {\n var file = evt.target.files[0];\n\n if (!file) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_18__[/* dialogBoxCreate */ \"a\"])(\"Invalid file selected\");\n return;\n }\n\n var reader = new FileReader();\n\n reader.onload = function (e) {\n var contents = e.target.result;\n loadImportedGame(saveObject, contents);\n };\n\n reader.readAsText(file);\n}\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/SaveObject.jsx?"); /***/ }), -/* 219 */ +/* 220 */ /*!*********************************************!*\ !*** ./src/StockMarket/StockMarketCosts.ts ***! \*********************************************/ @@ -1815,7 +1827,7 @@ eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __ eval("/* unused harmony export getStockMarketAccountCost */\n/* unused harmony export getStockMarketTixApiCost */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getStockMarket4SDataCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getStockMarket4STixApiCost; });\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Constants */ 5);\n\n\nfunction getStockMarketAccountCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n}\nfunction getStockMarketTixApiCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TIXAPICost;\n}\nfunction getStockMarket4SDataCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].MarketData4SCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataCost;\n}\nfunction getStockMarket4STixApiCost() {\n return _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].MarketDataTixApi4SCost * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_0__[/* BitNodeMultipliers */ \"a\"].FourSigmaMarketDataApiCost;\n}\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketCosts.ts?"); /***/ }), -/* 220 */ +/* 221 */ /*!***********************************************!*\ !*** ./src/Locations/ui/ApplyToJobButton.tsx ***! \***********************************************/ @@ -1824,10 +1836,10 @@ eval("/* unused harmony export getStockMarketAccountCost */\n/* unused harmony e /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ApplyToJobButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 395);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for a button that's used to apply for a job\n */\n\n\n\nclass ApplyToJobButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getJobRequirementTooltip = this.getJobRequirementTooltip.bind(this);\n }\n\n getJobRequirementTooltip() {\n const pos = this.props.p.getNextCompanyPosition(this.props.company, this.props.entryPosType);\n\n if (pos == null) {\n return \"\";\n }\n\n if (!this.props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__[/* getJobRequirementText */ \"a\"])(this.props.company, pos, true);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: this.props.onClick,\n style: this.props.style,\n text: this.props.text,\n tooltip: this.getJobRequirementTooltip()\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/ApplyToJobButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ApplyToJobButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 396);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for a button that's used to apply for a job\n */\n\n\n\nclass ApplyToJobButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getJobRequirementTooltip = this.getJobRequirementTooltip.bind(this);\n }\n\n getJobRequirementTooltip() {\n const pos = this.props.p.getNextCompanyPosition(this.props.company, this.props.entryPosType);\n\n if (pos == null) {\n return \"\";\n }\n\n if (!this.props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_1__[/* getJobRequirementText */ \"a\"])(this.props.company, pos, true);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: this.props.onClick,\n style: this.props.style,\n text: this.props.text,\n tooltip: this.getJobRequirementTooltip()\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/ApplyToJobButton.tsx?"); /***/ }), -/* 221 */ +/* 222 */ /*!*************************!*\ !*** ./src/RedPill.jsx ***! \*************************/ @@ -1836,10 +1848,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return enterBitNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return redPillFlag; });\n/* unused harmony export hackWorldDaemon */\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Prestige */ 274);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile/SourceFiles */ 277);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/**\n * Implementation for what happens when you destroy a BitNode\n */\n\n\n\n\n\n\nlet redPillFlag = false;\n\nfunction hackWorldDaemon(router, flume = false, quick = false) {\n router.toBitVerse(flume, quick);\n redPillFlag = true;\n}\n\nfunction giveSourceFile(bitNodeNumber) {\n var sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n var sourceFile = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][sourceFileKey];\n\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n } // Check if player already has this source file\n\n\n var alreadyOwned = false;\n var ownedSourceFile = null;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\");\n } else {\n ++ownedSourceFile.lvl;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(sourceFile.name + \" was upgraded to level \" + ownedSourceFile.lvl + \" for \" + \"destroying its corresponding BitNode!\");\n }\n } else {\n var playerSrcFile = new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedSourceFile */ \"a\"](bitNodeNumber, 1);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.push(playerSrcFile);\n\n if (bitNodeNumber === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n // Artificial Intelligence\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You received a Source-File for destroying a BitNode!

\" + sourceFile.name + \"

\" + sourceFile.info);\n }\n}\n\nfunction enterBitNode(router, flume, destroyedBitNode, newBitNode) {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][5] === 0 && newBitNode !== 5) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 0;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence_exp = 0;\n }\n }\n\n if (newBitNode === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n redPillFlag = false; // Set new Bit Node\n\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_1__[/* prestigeSourceFile */ \"b\"])(flume);\n}\n\n\n//# sourceURL=webpack:///./src/RedPill.jsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return enterBitNode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return redPillFlag; });\n/* unused harmony export hackWorldDaemon */\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Prestige */ 275);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SourceFile/PlayerOwnedSourceFile */ 443);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SourceFile/SourceFiles */ 278);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/**\n * Implementation for what happens when you destroy a BitNode\n */\n\n\n\n\n\n\nlet redPillFlag = false;\n\nfunction hackWorldDaemon(router, flume = false, quick = false) {\n router.toBitVerse(flume, quick);\n redPillFlag = true;\n}\n\nfunction giveSourceFile(bitNodeNumber) {\n var sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n var sourceFile = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][sourceFileKey];\n\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n } // Check if player already has this source file\n\n\n var alreadyOwned = false;\n var ownedSourceFile = null;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"The Source-File for the BitNode you just destroyed, \" + sourceFile.name + \", \" + \"is already at max level!\");\n } else {\n ++ownedSourceFile.lvl;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(sourceFile.name + \" was upgraded to level \" + ownedSourceFile.lvl + \" for \" + \"destroying its corresponding BitNode!\");\n }\n } else {\n var playerSrcFile = new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedSourceFile */ \"a\"](bitNodeNumber, 1);\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].sourceFiles.push(playerSrcFile);\n\n if (bitNodeNumber === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n // Artificial Intelligence\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You received a Source-File for destroying a BitNode!

\" + sourceFile.name + \"

\" + sourceFile.info);\n }\n}\n\nfunction enterBitNode(router, flume, destroyedBitNode, newBitNode) {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][5] === 0 && newBitNode !== 5) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 0;\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence_exp = 0;\n }\n }\n\n if (newBitNode === 5 && _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence === 0) {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].intelligence = 1;\n }\n\n redPillFlag = false; // Set new Bit Node\n\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_1__[/* prestigeSourceFile */ \"b\"])(flume);\n}\n\n\n//# sourceURL=webpack:///./src/RedPill.jsx?"); /***/ }), -/* 222 */ +/* 223 */ /*!*********************************!*\ !*** ./src/Exploits/Exploit.ts ***! \*********************************/ @@ -1850,18 +1862,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use strict"; eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Exploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ExploitName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return sanitizeExploits; });\n/*\nThe game cannot block every possible exploits. Specially since one of them is\nthat you can just edit your save file and that's impragmatic to prevent.\n\nSo instead we have source file minus 1. It is not obtained by destroying a\nBitNode but instead it is awarded when the player finds innovative ways to break\nthe game, this serves 2 purpose, [one] the developpers don't have to spend time\ntrying to implement anti-cheat measures and [two] finding ways to break a\nhacking game is very much in the spirit of the game.\nSource-File minus 1 is extremely weak because it can be fully level up quickly.\n*/\nlet Exploit;\n\n(function (Exploit) {\n Exploit[\"UndocumentedFunctionCall\"] = \"UndocumentedFunctionCall\";\n Exploit[\"Unclickable\"] = \"Unclickable\";\n Exploit[\"PrototypeTampering\"] = \"PrototypeTampering\";\n Exploit[\"Bypass\"] = \"Bypass\";\n Exploit[\"EditSaveFile\"] = \"EditSaveFile\";\n})(Exploit || (Exploit = {}));\n\nconst names = {\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n Unclickable: \"by clicking the unclickable.\",\n Bypass: \"by circumventing the ram cost of document.\"\n};\nfunction ExploitName(exploit) {\n return names[exploit];\n}\nfunction sanitizeExploits(exploits) {\n return exploits.filter(e => Object.keys(Exploit).includes(e));\n}\n\n//# sourceURL=webpack:///./src/Exploits/Exploit.ts?"); -/***/ }), -/* 223 */ -/*!************************************!*\ - !*** ./src/Locations/Locations.ts ***! - \************************************/ -/*! exports provided: Locations */ -/*! exports used: Locations */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Locations; });\n/* harmony import */ var _City__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./City */ 321);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Cities */ 104);\n/* harmony import */ var _Location__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Location */ 528);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/CityNames */ 21);\n/* harmony import */ var _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/LocationsMetadata */ 712);\n/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\n\n\n\n\n\nconst Locations = {};\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\n\nfunction constructLocation(p) {\n if (!p.name) {\n throw new Error(`Invalid constructor parameters for Location. No 'name' property`);\n }\n\n if (Locations[p.name] instanceof _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"]) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new _Location__WEBPACK_IMPORTED_MODULE_2__[/* Location */ \"a\"](p);\n return Locations[p.name];\n} // First construct all cities\n\n\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven] = new _City__WEBPACK_IMPORTED_MODULE_0__[/* City */ \"a\"](_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven);\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Aevum].asciiArt = `\n [aevum police headquarters] 26 \n o \n I \\\\ [bachman & associates] \n \\\\ 56 B \n x \\\\ [summit university] \n \\\\ \\\\ 28 \n \\\\ [snap fitness gym] x o--L-----------N \n K \\\\ / \n \\\\ \\\\ Q [casino] \n x 58 \\\\ / [travel agency] \n \\\\ 94 95 o \n 90 x 59 o------o | \n \\\\ / \\\\ | 98 102 103 \n o--------O------x----o 93 96 o-----+------------o o----o \n \\\\ | \\\\ / \n [hospital] \\\\ 61 [ecorp] x 31 99 o-F-o 101 \n o | \n | o---E-- | [fulcrum tech.] \n x 62 / A [aerocorp] \n [crush fitness gym] | / | \n | / | \n o--------D------+--o o \n | |\\\\ [rho construction] \n H [netlink tech.] | J \n | | \\\\ \n | 34 x \\\\ \n [clarke inc.] C | \\\\ [world stock exchange] \n | | \\\\ \n | | o-M-------R--------o \n[galactic cybersystems] G 35 x \n | [watchdog security] \n | \n 67 o \n \n [the slums] P `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Chongqing].asciiArt = `\n | \n 75 o \n \\\\ \n o 76 \n 7 | | \n | + 77 \n [world stock exchange] F | \n \\\\ o 78 [kuaigong international] \n \\\\ / \n 38 o----x--x------x------A--------- \n / 39 | 41 \n 37 o + 79 o--x--x-C-0 \n / | / \n / x-----+-----x-----0 [hospital] \n[solaris space system] B | \n | + 80 \n | | \n 34 o E [travel agency] \n | \n | \n x 82 \n [the slums] D `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Ishima].asciiArt = `\n o 59 \n o o | \n [storm tech.] | | G [world stock exchange] \n | | 28 | \n 23 o--C------o--------+----x----o | \n / / 25 | 27 \\\\ x 57 \n / / | \\\\ | \n / / | \\\\ | \n o 22 o | \\\\| 29/56 \n | | o \n | [hospital] D / \\\\ 3 2 1 \n o | / \\\\ o-------x------o \n / o / \\\\ / \n 48 o / 55 x \\\\ / \n \\\\ / / x \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ \n / \\\\ / \\\\ \n / \\\\ [travel agency] F o 31 \n / \\\\ 51 / \n / o----B------x-----o \n o 50 52 \n [omega soft.] \n [the slums] E `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n \\\\ [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 G \n [vitalife] o 12 [global pharmaceuticals] \n | \n o--D-x----x-------x-C-+--------x--x-B-x---x-o \n 21 22 23 \\\\ 24 25 26 27 \n \\\\ \n [noodle bar] x 14 \n \\\\ \n \\\\ \n [hospital] o 15 [world stock exchange] \n | \n o--x--E--x-----x-----x---+---x----x--H--x-o \n | \n | \n o 17 \n \n \n \n F [the slums] \n `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Sector12].asciiArt = `\n 78 o 97 \n o [icarus microsystems] / \n N [powerhouse gym] o I \n 1 | | / \n o-----+---x----o 4 A [alpha ent.] o-------o / \n | 3 \\\\ | \\\\ / \n | \\\\ | [iron gym] x 95 \n (79) x \\\\ | / \\\\ \n | o-E----+----x----J--o 10 / o----T--o \n | | 8 \\\\ 94 x \n 80 x [city hall] | x 11 / [world stock exchange]\n | | \\\\ / \n | C [cia] \\\\ / \n Q [hospital] | F P [universal energy] \n | o [deltaone] \\\\ / \n | 35 o---------x 13/92/36 \n L [megacorp] 33 / / \\\\ \n | o------------o 34 / \\\\ \n (29) | / [carmichael sec.] D \\\\ \n o-----+-----x------o / O [rothman university] \n | 31 32 [nsa] M \n | / \n B [blade industries] H \n | / [four sigma] \n | [joe's guns] / \n | / \n 85 o--G--------K--------S-------o 88 [the slums] R \n \n [foodnstuff] [travel agency] `;\n_Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][_data_CityNames__WEBPACK_IMPORTED_MODULE_3__[/* CityName */ \"a\"].Volhaven].asciiArt = `\n [omnia cybersystems] \n 17 66 68 \n o o------G-------o \n \\\\ / \\\\ \n \\\\ o 65 o 69 \n [syscore sec.] H | | \n \\\\ | | [millenium fitness gym] \n \\\\ | 21 22 23 24 | 26 \n o----+--x--x----x---x---+-----x-------D-----o \n 19 | | 28 \n | F [omnitek inc.] \n [hospital] J 63 o \n | / 72 \n 3 | 5 6 / 9 \n o--------+----x-----x----+----------M-------o \n / | | \n / 61 x [helios labs] B [world stock exchange] \n [travel agency] L | | \n / | o \n / E [nwo] / 75 \n / [computek] | / \n / A-------o------I-----o \n 1 o | | \n | [zb] o 77 \n [lexocorp] C \n | \n o \n 57 \n \n \n [the slums] K `; // Then construct all locations, and add them to the cities as we go.\n\nfor (const metadata of _data_LocationsMetadata__WEBPACK_IMPORTED_MODULE_4__[/* LocationsMetadata */ \"a\"]) {\n const loc = constructLocation(metadata);\n const cityName = loc.city;\n\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city in _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"]) {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][city].addLocation(loc.name);\n }\n } else {\n _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][cityName].addLocation(loc.name);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/Locations.ts?"); - /***/ }), /* 224 */ /*!**************************************!*\ @@ -1943,7 +1943,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createRandomIp; });\n/* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/getRandomByte */ 404);\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\n\nfunction createRandomIp() {\n const ip = Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(99) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9);\n return ip;\n}\n\n//# sourceURL=webpack:///./utils/IPAddress.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createRandomIp; });\n/* harmony import */ var _helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/getRandomByte */ 405);\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\n\nfunction createRandomIp() {\n const ip = Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(99) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9) + \".\" + Object(_helpers_getRandomByte__WEBPACK_IMPORTED_MODULE_0__[/* getRandomByte */ \"a\"])(9);\n return ip;\n}\n\n//# sourceURL=webpack:///./utils/IPAddress.ts?"); /***/ }), /* 241 */ @@ -1982,7 +1982,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeve; });\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Crime/Crime */ 157);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Sleeve extends _Person__WEBPACK_IMPORTED_MODULE_1__[/* Person */ \"a\"] {\n /**\n * Stores the name of the class that the player is currently taking\n */\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n\n /**\n * Enum value for current task\n */\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n\n /**\n * Milliseconds spent on current task\n */\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n\n /**\n * Keeps track of experience + money earned for player\n */\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n\n /**\n * Records experience gain rate for the current task\n */\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n\n /**\n * Stored number of game \"loop\" cycles\n */\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n constructor(p = null) {\n super();\n\n _defineProperty(this, \"className\", \"\");\n\n _defineProperty(this, \"crimeType\", \"\");\n\n _defineProperty(this, \"currentTask\", _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle);\n\n _defineProperty(this, \"currentTaskLocation\", \"\");\n\n _defineProperty(this, \"currentTaskMaxTime\", 0);\n\n _defineProperty(this, \"currentTaskTime\", 0);\n\n _defineProperty(this, \"earningsForSleeves\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForPlayer\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"factionWorkType\", _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None);\n\n _defineProperty(this, \"gainRatesForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"gymStatType\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"memory\", 1);\n\n _defineProperty(this, \"shock\", 1);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"sync\", 1);\n\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n /**\n * Commit crimes\n */\n\n\n commitCrime(p, crimeKey) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][crimeKey];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n this.crimeType = crimeKey;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime;\n return true;\n }\n /**\n * Called to stop the current task\n */\n\n\n finishTask(p) {\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][this.crimeType];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n const keysForIteration = Object.keys(successGainRates);\n\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n } // Do not reset task to IDLE\n\n\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {// For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n return retValue;\n }\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n\n\n gainExperience(p, exp, numCycles = 1, fromOtherSleeve = false) {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n } // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n\n const multFac = this.shock / 100 * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac; // Experience is gained by both this sleeve and player\n\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n } // Record earnings for other sleeves\n\n\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100); // Return the experience to be gained by other sleeves\n\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0\n };\n }\n /**\n * Earn money for player\n */\n\n\n gainMoney(p, task, numCycles = 1) {\n const gain = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain);\n p.recordMoneySource(gain, \"sleeves\");\n }\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n\n\n getMemoryUpgradeCost(n) {\n const amt = Math.round(n);\n\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n\n\n getRepGain(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction) {\n let favorMult = 1;\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company) {\n const companyName = this.currentTaskLocation;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma);\n const favorMult = 1 + company.favor / 100;\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`);\n return 0;\n }\n }\n\n installAugmentation(aug) {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({\n name: aug.name,\n level: 1\n });\n this.updateStatLevels();\n }\n\n log(entry) {\n const MaxLogSize = 50;\n this.logs.push(entry);\n\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n /**\n * Called on every sleeve for a Source File prestige\n */\n\n\n prestige(p) {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0; // Reset task-related stuff\n\n this.resetTaskStatus();\n this.earningsForSleeves = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.earningsForPlayer = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.shockRecovery(p); // Reset augs and multipliers\n\n this.augmentations = [];\n this.resetMultipliers(); // Reset sleeve-related stats\n\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n this.logs = [];\n }\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n\n\n process(p, numCycles = 1) {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n this.storedCycles += numCycles;\n\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let time = this.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n let cyclesUsed = this.storedCycles;\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time; // Shock gradually goes towards 100\n\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n\n switch (this.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle:\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class:\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed); // Gain faction reputation\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"])) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][this.currentTaskLocation];\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n break;\n\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n this.storedCycles -= cyclesUsed;\n return retValue;\n }\n /**\n * Resets all parameters used to keep information about the current task\n */\n\n\n resetTaskStatus() {\n this.earningsForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.gainRatesForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery;\n return true;\n }\n\n synchronize(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro;\n return true;\n }\n /**\n * Take a course at a university\n */\n\n\n takeUniversityCourse(p, universityName, className) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity;\n costMult = 4;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult);\n break;\n\n case \"networks\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult);\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult);\n break;\n\n case \"management\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult);\n break;\n\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult);\n break;\n\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class;\n return true;\n }\n /**\n * Travel to another City. Costs money from player\n */\n\n\n travel(p, newCity) {\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].TravelCost);\n this.city = newCity;\n return true;\n }\n\n tryBuyAugmentation(p, aug) {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n } // Verify that this sleeve does not already have that augmentation.\n\n\n if (this.augmentations.some(a => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost);\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class) {\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"data structures\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"networks\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"management\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n case \"leadership\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym:\n expMult = 4;\n break;\n\n default:\n return;\n } // Set stat gain rate\n\n\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat = this.gymStatType.toLowerCase();\n\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n) {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n\n\n workForCompany(p, companyName) {\n if (!(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"]) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (company == null) {\n return false;\n }\n\n if (companyPosition == null) {\n return false;\n }\n\n this.gainRatesForTask.money = companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney;\n this.gainRatesForTask.hack = companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.str = companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.def = companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.dex = companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.agi = companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.cha = companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.currentTaskLocation = companyName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n return true;\n }\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n\n\n workForFaction(p, factionName, workType) {\n if (factionName === \"\") {\n return false;\n }\n\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName].getInfo(); // Set type of work (hacking/field/security), and the experience gains\n\n const sanitizedWorkType = workType.toLowerCase();\n\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n return true;\n }\n /**\n * Begin a gym workout task\n */\n\n\n workoutAtGym(p, gymName, stat) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n const sanitizedStat = stat.toLowerCase(); // Set cost\n\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult); // Validate \"stat\" argument\n\n if (!sanitizedStat.includes(\"str\") && !sanitizedStat.includes(\"def\") && !sanitizedStat.includes(\"dex\") && !sanitizedStat.includes(\"agi\")) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym;\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_toJSON */ \"b\"])(\"Sleeve\", this);\n }\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_fromJSON */ \"a\"])(Sleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Reviver */ \"c\"].constructors.Sleeve = Sleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/Sleeve.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeve; });\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Person__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Person */ 158);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Crime/Crime */ 157);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Faction/FactionWorkTypeEnum */ 126);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Sleeves are bodies that contain the player's cloned consciousness.\n * The player can use these bodies to perform different tasks synchronously.\n *\n * Each sleeve is its own individual, meaning it has its own stats/exp\n *\n * Sleeves are unlocked in BitNode-10.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Sleeve extends _Person__WEBPACK_IMPORTED_MODULE_1__[/* Person */ \"a\"] {\n /**\n * Stores the name of the class that the player is currently taking\n */\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n\n /**\n * Enum value for current task\n */\n\n /**\n * Contains details about the sleeve's current task. The info stored\n * in this depends on the task type\n *\n * Faction/Company Work: Name of Faction/Company\n * Crime: Money earned if successful\n * Class/Gym: Name of university/gym\n */\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n\n /**\n * Milliseconds spent on current task\n */\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n\n /**\n * Keeps track of experience + money earned for player\n */\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n\n /**\n * Records experience gain rate for the current task\n */\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n\n /**\n * Sleeve shock. Number between 0 and 100\n * Trauma/shock that comes with being in a sleeve. Experience earned\n * is multipled by shock%. This gets applied before synchronization\n *\n * Reputation earned is also multiplied by shock%\n */\n\n /**\n * Stored number of game \"loop\" cycles\n */\n\n /**\n * Synchronization. Number between 0 and 100\n * When experience is earned by sleeve, both the player and the sleeve get\n * sync% of the experience earned. Other sleeves get sync^2% of exp\n */\n constructor(p = null) {\n super();\n\n _defineProperty(this, \"className\", \"\");\n\n _defineProperty(this, \"crimeType\", \"\");\n\n _defineProperty(this, \"currentTask\", _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle);\n\n _defineProperty(this, \"currentTaskLocation\", \"\");\n\n _defineProperty(this, \"currentTaskMaxTime\", 0);\n\n _defineProperty(this, \"currentTaskTime\", 0);\n\n _defineProperty(this, \"earningsForSleeves\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForPlayer\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"earningsForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"factionWorkType\", _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None);\n\n _defineProperty(this, \"gainRatesForTask\", Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])());\n\n _defineProperty(this, \"gymStatType\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"memory\", 1);\n\n _defineProperty(this, \"shock\", 1);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"sync\", 1);\n\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n /**\n * Commit crimes\n */\n\n\n commitCrime(p, crimeKey) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][crimeKey];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n this.crimeType = crimeKey;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime;\n return true;\n }\n /**\n * Called to stop the current task\n */\n\n\n finishTask(p) {\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_4__[/* Crimes */ \"a\"][this.crimeType];\n\n if (!(crime instanceof _Crime_Crime__WEBPACK_IMPORTED_MODULE_3__[/* Crime */ \"a\"])) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n const keysForIteration = Object.keys(successGainRates);\n\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n } // Do not reset task to IDLE\n\n\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {// For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n return retValue;\n }\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n\n\n gainExperience(p, exp, numCycles = 1, fromOtherSleeve = false) {\n // If the experience is coming from another sleeve, it is not multiplied by anything.\n // Also the player does not earn anything\n if (fromOtherSleeve) {\n if (exp.hack > 0) {\n this.hacking_exp += exp.hack;\n }\n\n if (exp.str > 0) {\n this.strength_exp += exp.str;\n }\n\n if (exp.def > 0) {\n this.defense_exp += exp.def;\n }\n\n if (exp.dex > 0) {\n this.dexterity_exp += exp.dex;\n }\n\n if (exp.agi > 0) {\n this.agility_exp += exp.agi;\n }\n\n if (exp.cha > 0) {\n this.charisma_exp += exp.cha;\n }\n\n return Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n } // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\n\n\n const multFac = this.shock / 100 * (this.sync / 100) * numCycles;\n const pHackExp = exp.hack * multFac;\n const pStrExp = exp.str * multFac;\n const pDefExp = exp.def * multFac;\n const pDexExp = exp.dex * multFac;\n const pAgiExp = exp.agi * multFac;\n const pChaExp = exp.cha * multFac; // Experience is gained by both this sleeve and player\n\n if (pHackExp > 0) {\n this.hacking_exp += pHackExp;\n p.gainHackingExp(pHackExp);\n this.earningsForPlayer.hack += pHackExp;\n this.earningsForTask.hack += pHackExp;\n }\n\n if (pStrExp > 0) {\n this.strength_exp += pStrExp;\n p.gainStrengthExp(pStrExp);\n this.earningsForPlayer.str += pStrExp;\n this.earningsForTask.str += pStrExp;\n }\n\n if (pDefExp > 0) {\n this.defense_exp += pDefExp;\n p.gainDefenseExp(pDefExp);\n this.earningsForPlayer.def += pDefExp;\n this.earningsForTask.def += pDefExp;\n }\n\n if (pDexExp > 0) {\n this.dexterity_exp += pDexExp;\n p.gainDexterityExp(pDexExp);\n this.earningsForPlayer.dex += pDexExp;\n this.earningsForTask.dex += pDexExp;\n }\n\n if (pAgiExp > 0) {\n this.agility_exp += pAgiExp;\n p.gainAgilityExp(pAgiExp);\n this.earningsForPlayer.agi += pAgiExp;\n this.earningsForTask.agi += pAgiExp;\n }\n\n if (pChaExp > 0) {\n this.charisma_exp += pChaExp;\n p.gainCharismaExp(pChaExp);\n this.earningsForPlayer.cha += pChaExp;\n this.earningsForTask.cha += pChaExp;\n } // Record earnings for other sleeves\n\n\n this.earningsForSleeves.hack += pHackExp * (this.sync / 100);\n this.earningsForSleeves.str += pStrExp * (this.sync / 100);\n this.earningsForSleeves.def += pDefExp * (this.sync / 100);\n this.earningsForSleeves.dex += pDexExp * (this.sync / 100);\n this.earningsForSleeves.agi += pAgiExp * (this.sync / 100);\n this.earningsForSleeves.cha += pChaExp * (this.sync / 100); // Return the experience to be gained by other sleeves\n\n return {\n hack: pHackExp * (this.sync / 100),\n str: pStrExp * (this.sync / 100),\n def: pDefExp * (this.sync / 100),\n dex: pDexExp * (this.sync / 100),\n agi: pAgiExp * (this.sync / 100),\n cha: pChaExp * (this.sync / 100),\n money: 0\n };\n }\n /**\n * Earn money for player\n */\n\n\n gainMoney(p, task, numCycles = 1) {\n const gain = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain);\n p.recordMoneySource(gain, \"sleeves\");\n }\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n\n\n getMemoryUpgradeCost(n) {\n const amt = Math.round(n);\n\n if (amt < 0) {\n return 0;\n }\n\n if (this.memory + amt > 100) {\n return this.getMemoryUpgradeCost(100 - this.memory);\n }\n\n const mult = 1.02;\n const baseCost = 1e12;\n let currCost = 0;\n let currMemory = this.memory - 1;\n\n for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n\n\n getRepGain(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction) {\n let favorMult = 1;\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company) {\n const companyName = this.currentTaskLocation;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n console.error(`Invalid company found when trying to calculate rep gain: ${companyName}`);\n return 0;\n }\n\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (companyPosition == null) {\n console.error(`Invalid company position name found when trying to calculate rep gain: ${p.jobs[companyName]}`);\n return 0;\n }\n\n const jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma);\n const favorMult = 1 + company.favor / 100;\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n console.warn(`Sleeve.getRepGain() called for invalid task type: ${this.currentTask}`);\n return 0;\n }\n }\n\n installAugmentation(aug) {\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.applyAugmentation(aug);\n this.augmentations.push({\n name: aug.name,\n level: 1\n });\n this.updateStatLevels();\n }\n\n log(entry) {\n const MaxLogSize = 50;\n this.logs.push(entry);\n\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n /**\n * Called on every sleeve for a Source File prestige\n */\n\n\n prestige(p) {\n // Reset exp\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0; // Reset task-related stuff\n\n this.resetTaskStatus();\n this.earningsForSleeves = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.earningsForPlayer = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.shockRecovery(p); // Reset augs and multipliers\n\n this.augmentations = [];\n this.resetMultipliers(); // Reset sleeve-related stats\n\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n this.logs = [];\n }\n /**\n * Process loop\n * Returns an object containing the amount of experience that should be\n * transferred to all other sleeves\n */\n\n\n process(p, numCycles = 1) {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n this.storedCycles += numCycles;\n\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let time = this.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n let cyclesUsed = this.storedCycles;\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n\n if (time < 0 || cyclesUsed < 0) {\n console.warn(`Sleeve.process() calculated negative cycle usage`);\n time = 0;\n cyclesUsed = 0;\n }\n }\n\n this.currentTaskTime += time; // Shock gradually goes towards 100\n\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n let retValue = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n\n switch (this.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle:\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class:\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed); // Gain faction reputation\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][this.currentTaskLocation];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"])) {\n console.error(`Invalid faction for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n fac.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company:\n {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][this.currentTaskLocation];\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n console.error(`Invalid company for Sleeve task: ${this.currentTaskLocation}`);\n break;\n }\n\n company.playerReputation += this.getRepGain(p) * cyclesUsed;\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n break;\n\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n this.storedCycles -= cyclesUsed;\n return retValue;\n }\n /**\n * Resets all parameters used to keep information about the current task\n */\n\n\n resetTaskStatus() {\n this.earningsForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.gainRatesForTask = Object(_Person__WEBPACK_IMPORTED_MODULE_1__[/* createTaskTracker */ \"b\"])();\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Recovery;\n return true;\n }\n\n synchronize(p) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Synchro;\n return true;\n }\n /**\n * Take a course at a university\n */\n\n\n takeUniversityCourse(p, universityName, className) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity;\n costMult = 4;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult);\n break;\n\n case \"networks\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult);\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult);\n break;\n\n case \"management\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult);\n break;\n\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult);\n break;\n\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class;\n return true;\n }\n /**\n * Travel to another City. Costs money from player\n */\n\n\n travel(p, newCity) {\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].TravelCost);\n this.city = newCity;\n return true;\n }\n\n tryBuyAugmentation(p, aug) {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n } // Verify that this sleeve does not already have that augmentation.\n\n\n if (this.augmentations.some(a => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost);\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p) {\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Class) {\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"data structures\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"networks\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"algorithms\":\n this.gainRatesForTask.hack = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n\n case \"management\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n case \"leadership\":\n this.gainRatesForTask.cha = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n\n switch (this.currentTaskLocation.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym:\n expMult = 4;\n break;\n\n default:\n return;\n } // Set stat gain rate\n\n\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat = this.gymStatType.toLowerCase();\n\n if (sanitizedStat.includes(\"str\")) {\n this.gainRatesForTask.str = baseGymExp * totalExpMultiplier * this.strength_exp_mult;\n } else if (sanitizedStat.includes(\"def\")) {\n this.gainRatesForTask.def = baseGymExp * totalExpMultiplier * this.defense_exp_mult;\n } else if (sanitizedStat.includes(\"dex\")) {\n this.gainRatesForTask.dex = baseGymExp * totalExpMultiplier * this.dexterity_exp_mult;\n } else if (sanitizedStat.includes(\"agi\")) {\n this.gainRatesForTask.agi = baseGymExp * totalExpMultiplier * this.agility_exp_mult;\n }\n\n return;\n }\n\n console.warn(`Sleeve.updateTaskGainRates() called for unexpected task type ${this.currentTask}`);\n }\n\n upgradeMemory(n) {\n if (n < 0) {\n console.warn(`Sleeve.upgradeMemory() called with negative value: ${n}`);\n return;\n }\n\n this.memory = Math.min(100, Math.round(this.memory + n));\n }\n /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n\n\n workForCompany(p, companyName) {\n if (!(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"]) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_7__[/* CompanyPositions */ \"a\"][p.jobs[companyName]];\n\n if (company == null) {\n return false;\n }\n\n if (companyPosition == null) {\n return false;\n }\n\n this.gainRatesForTask.money = companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney;\n this.gainRatesForTask.hack = companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.str = companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.def = companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.dex = companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.agi = companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.gainRatesForTask.cha = companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n this.currentTaskLocation = companyName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Company;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n return true;\n }\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n\n\n workForFaction(p, factionName, workType) {\n if (factionName === \"\") {\n return false;\n }\n\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][factionName].getInfo(); // Set type of work (hacking/field/security), and the experience gains\n\n const sanitizedWorkType = workType.toLowerCase();\n\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n\n this.factionWorkType = _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_11__[/* FactionWorkType */ \"a\"].Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_2__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Faction;\n this.currentTaskMaxTime = _Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n return true;\n }\n /**\n * Begin a gym workout task\n */\n\n\n workoutAtGym(p, gymName, stat) {\n if (this.currentTask !== _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n } // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n\n\n let costMult = 1;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Aevum) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Sector12) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_12__[/* CityName */ \"a\"].Volhaven) {\n return false;\n }\n\n this.currentTaskLocation = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n\n default:\n return false;\n } // Set experience/money gains based on class\n\n\n const sanitizedStat = stat.toLowerCase(); // Set cost\n\n this.gainRatesForTask.money = -1 * (_Constants__WEBPACK_IMPORTED_MODULE_8__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult); // Validate \"stat\" argument\n\n if (!sanitizedStat.includes(\"str\") && !sanitizedStat.includes(\"def\") && !sanitizedStat.includes(\"dex\") && !sanitizedStat.includes(\"agi\")) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_0__[/* SleeveTaskType */ \"a\"].Gym;\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_toJSON */ \"b\"])(\"Sleeve\", this);\n }\n /**\n * Initiatizes a Sleeve object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Generic_fromJSON */ \"a\"])(Sleeve, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_14__[/* Reviver */ \"c\"].constructors.Sleeve = Sleeve;\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/Sleeve.ts?"); /***/ }), /* 247 */ @@ -2006,7 +2006,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNode; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 197);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\n\n\n\n\n\nclass HacknetNode {\n // Node's number of cores\n // Node's Level\n // Node's production per second\n // How long this Node has existed, in seconds\n // Node's RAM (GB)\n // Total money earned by this Node\n constructor(name = \"\", prodMult = 1) {\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"moneyGainRatePerSecond\", 0);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"ram\", 1);\n\n _defineProperty(this, \"totalMoneyGenerated\", 0);\n\n this.name = name;\n this.updateMoneyGainRate(prodMult);\n } // Get the cost to upgrade this Node's number of cores\n\n\n calculateCoreUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateCoreUpgradeCost */ \"a\"])(this.cores, levels, costMult);\n } // Get the cost to upgrade this Node's level\n\n\n calculateLevelUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateLevelUpgradeCost */ \"b\"])(this.level, levels, costMult);\n } // Get the cost to upgrade this Node's RAM\n\n\n calculateRamUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateRamUpgradeCost */ \"e\"])(this.ram, levels, costMult);\n } // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n return gain;\n } // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n\n\n upgradeCore(levels = 1, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n\n\n upgradeLevel(levels = 1, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n\n\n upgradeRam(levels = 1, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n\n this.updateMoneyGainRate(prodMult);\n } // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n\n\n updateMoneyGainRate(prodMult) {\n this.moneyGainRatePerSecond = Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateMoneyGainRate */ \"c\"])(this.level, this.ram, this.cores, prodMult);\n\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Error in calculating Hacknet Node production. Please report to game developer\", false);\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"HacknetNode\", this);\n }\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(HacknetNode, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.HacknetNode = HacknetNode;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetNode.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNode; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./formulas/HacknetNodes */ 198);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/Constants */ 32);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Hacknet Node Class\n *\n * Hacknet Nodes are specialized machines that passively earn the player money over time.\n * They can be upgraded to increase their production\n */\n\n\n\n\n\nclass HacknetNode {\n // Node's number of cores\n // Node's Level\n // Node's production per second\n // How long this Node has existed, in seconds\n // Node's RAM (GB)\n // Total money earned by this Node\n constructor(name = \"\", prodMult = 1) {\n _defineProperty(this, \"cores\", 1);\n\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"moneyGainRatePerSecond\", 0);\n\n _defineProperty(this, \"onlineTimeSeconds\", 0);\n\n _defineProperty(this, \"ram\", 1);\n\n _defineProperty(this, \"totalMoneyGenerated\", 0);\n\n this.name = name;\n this.updateMoneyGainRate(prodMult);\n } // Get the cost to upgrade this Node's number of cores\n\n\n calculateCoreUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateCoreUpgradeCost */ \"a\"])(this.cores, levels, costMult);\n } // Get the cost to upgrade this Node's level\n\n\n calculateLevelUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateLevelUpgradeCost */ \"b\"])(this.level, levels, costMult);\n } // Get the cost to upgrade this Node's RAM\n\n\n calculateRamUpgradeCost(levels = 1, costMult) {\n return Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateRamUpgradeCost */ \"e\"])(this.ram, levels, costMult);\n } // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n\n\n process(numCycles = 1) {\n const seconds = numCycles * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MilliPerCycle / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\n\n if (isNaN(gain)) {\n console.error(`Hacknet Node ${this.name} calculated earnings of NaN`);\n gain = 0;\n }\n\n this.totalMoneyGenerated += gain;\n this.onlineTimeSeconds += seconds;\n return gain;\n } // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n\n\n upgradeCore(levels = 1, prodMult) {\n this.cores = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n\n\n upgradeLevel(levels = 1, prodMult) {\n this.level = Math.min(_data_Constants__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeConstants */ \"a\"].MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n } // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n\n\n upgradeRam(levels = 1, prodMult) {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n\n this.updateMoneyGainRate(prodMult);\n } // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n\n\n updateMoneyGainRate(prodMult) {\n this.moneyGainRatePerSecond = Object(_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_1__[/* calculateMoneyGainRate */ \"c\"])(this.level, this.ram, this.cores, prodMult);\n\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Error in calculating Hacknet Node production. Please report to game developer\", false);\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"HacknetNode\", this);\n }\n /**\n * Initiatizes a HacknetNode object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(HacknetNode, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.HacknetNode = HacknetNode;\n\n//# sourceURL=webpack:///./src/Hacknet/HacknetNode.ts?"); /***/ }), /* 249 */ @@ -2055,16 +2055,28 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return processOrders; });\n/* harmony import */ var _BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BuyingAndSelling */ 155);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\n\n\n\n\n\n\n\n\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction processOrders(stock, orderType, posType, refs) {\n const orderBook = refs.stockMarket[\"Orders\"];\n\n if (orderBook == null) {\n const orders = {};\n\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n\n let stockOrders = orderBook[stock.symbol];\n\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\n\nfunction executeOrder(order, refs) {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol]; // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n\n const opts = {\n suppressDialog: true\n };\n let res = true;\n let isBuy = false;\n\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n isBuy = true;\n\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* buyStock */ \"a\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* shortStock */ \"d\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellStock */ \"c\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellShort */ \"b\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n } // Position type, for logging/message purposes\n\n\n const pos = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \") was filled (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(Math.round(order.shares)), \" shares)\"));\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Failed to execute \", order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares\"));\n }\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/OrderProcessing.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return processOrders; });\n/* harmony import */ var _BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BuyingAndSelling */ 155);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_7__);\n/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\n\n\n\n\n\n\n\n\n\n/**\n * Search for all orders of a specific type and execute them if appropriate\n * @param {Stock} stock - Stock for which orders should be processed\n * @param {OrderTypes} orderType - Type of order to check (Limit/Stop buy/sell)\n * @param {PositionTypes} posType - Long or short\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\nfunction processOrders(stock, orderType, posType, refs) {\n const orderBook = refs.stockMarket[\"Orders\"];\n\n if (orderBook == null) {\n const orders = {};\n\n for (const name in refs.stockMarket) {\n const stock = refs.stockMarket[name];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n continue;\n }\n\n orders[stock.symbol] = [];\n }\n\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n\n let stockOrders = orderBook[stock.symbol];\n\n if (stockOrders == null || !(stockOrders.constructor === Array)) {\n console.error(`Invalid Order book for ${stock.symbol} in processOrders(): ${stockOrders}`);\n stockOrders = [];\n return;\n }\n\n for (const order of stockOrders) {\n if (order.type === orderType && order.pos === posType) {\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long && stock.price <= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short && stock.price >= order.price) {\n executeOrder(\n /*66*/\n order, refs);\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n }\n }\n}\n/**\n * Execute a Stop or Limit Order.\n * @param {Order} order - Order being executed\n * @param {IProcessOrderRefs} refs - References to objects/functions that are required for this function\n */\n\nfunction executeOrder(order, refs) {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_1__[/* Stock */ \"a\"])) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol]; // When orders are executed, the buying and selling functions shouldn't\n // emit popup dialog boxes. This options object configures the functions for that\n\n const opts = {\n suppressDialog: true\n };\n let res = true;\n let isBuy = false;\n\n switch (order.type) {\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitBuy:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopBuy:\n isBuy = true;\n\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* buyStock */ \"a\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* shortStock */ \"d\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].LimitSell:\n case _data_OrderTypes__WEBPACK_IMPORTED_MODULE_2__[/* OrderTypes */ \"a\"].StopSell:\n if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellStock */ \"c\"])(stock, order.shares, null, opts) && res;\n } else if (order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Short) {\n res = Object(_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_0__[/* sellShort */ \"b\"])(stock, order.shares, null, opts) && res;\n }\n\n break;\n\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n } // Position type, for logging/message purposes\n\n\n const pos = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_3__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\";\n\n if (res) {\n for (let i = 0; i < stockOrders.length; ++i) {\n if (order == stockOrders[i]) {\n stockOrders.splice(i, 1);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \") was filled (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatShares(Math.round(order.shares)), \" shares)\"));\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else {\n if (isBuy) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_7__[\"Fragment\"], null, \"Failed to execute \", order.type, \" for \", stock.symbol, \" @ \", react__WEBPACK_IMPORTED_MODULE_7__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: order.price\n }), \" (\", pos, \"). This is most likely because you do not have enough money or the order would exceed the stock's maximum number of shares\"));\n }\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/OrderProcessing.tsx?"); + +/***/ }), +/* 254 */ +/*!*****************************!*\ + !*** ./src/ui/GameRoot.tsx ***! + \*****************************/ +/*! exports provided: Router, GameRoot */ +/*! exports used: GameRoot, Router */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SaveObject */ 219);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ExportBonus */ 247);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Locations/Locations */ 194);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Prestige */ 275);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Router */ 26);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 950);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 959);\n/* harmony import */ var _Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Locations/ui/GenericLocation */ 558);\n/* harmony import */ var _Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../Locations/ui/City */ 992);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 993);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 994);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1010);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1011);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1016);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1017);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1027);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1028);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./CharacterInfo */ 1043);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 465);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1044);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1053);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./React/CharacterOverview */ 1056);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1060);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../RedPill */ 222);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])({\n root: {\n \"-ms-overflow-style\": \"none\"\n /* for Internet Explorer, Edge */\n ,\n \"scrollbar-width\": \"none\"\n /* for Firefox */\n ,\n margin: theme.spacing(0)\n }\n}));\nlet filename = \"\";\nlet code = \"\";\nlet Router = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCharacterInfo: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n },\n toLocation: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(player.currentWorkFactionName ? _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName] : undefined);\n if (faction === undefined && page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction) throw new Error(\"Trying to go to a page without the proper setup\");\n const [flume, setFlume] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [quick, setQuick] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [location, setLocation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(undefined);\n if (location === undefined && (page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job)) throw new Error(\"Trying to go to a page without the proper setup\");\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n setLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_5__[/* Locations */ \"a\"][player.companyName]);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City);\n },\n toTravel: () => {\n player.gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].TravelAgency);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location);\n }\n };\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n filename = \"\";\n code = \"\";\n window.scrollTo(0, 0);\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__[/* SidebarRoot */ \"a\"], {\n player: player,\n router: Router,\n page: page\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n className: classes.root,\n flexGrow: 1,\n display: \"block\",\n width: \"100%\",\n px: 1,\n height: \"100vh\"\n }, page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_39__[/* CharacterInfo */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_19__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__[/* LocationCity */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__[/* GameOptionsRoot */ \"a\"], {\n player: player,\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb),\n delete: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].deleteGame(engine.indexedDb),\n export: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame(),\n import: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].importGame(),\n forceKill: () => {\n for (const hostname of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__[/* AugmentationsRoot */ \"a\"], {\n exportGameFn: () => {\n _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame();\n Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_3__[/* onExport */ \"c\"])(player);\n },\n installAugmentationsFn: () => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* installAugmentations */ \"d\"])();\n Router.toTerminal();\n }\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?"); /***/ }), -/* 254 */, /* 255 */, /* 256 */, /* 257 */, /* 258 */, /* 259 */, -/* 260 */ +/* 260 */, +/* 261 */ /*!*****************************************!*\ !*** ./src/Corporation/Corporation.tsx ***! \*****************************************/ @@ -2073,11 +2085,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var _CorporationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CorporationState */ 641);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/CorporationUpgrades */ 340);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/LiteratureHelpers */ 430);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! decimal.js */ 77);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n // UI Related Imports\n\n\nclass Corporation {\n //A division/business sector is represented by the object:\n //Financial stats\n //Publicly traded\n // Total existing shares\n // Total shares owned by player\n // Game cycles until player can sell shares again\n // Game cycles until player can issue shares again\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"The Corporation\");\n\n _defineProperty(this, \"divisions\", []);\n\n _defineProperty(this, \"funds\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9));\n\n _defineProperty(this, \"revenue\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"expenses\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"fundingRound\", 0);\n\n _defineProperty(this, \"public\", false);\n\n _defineProperty(this, \"totalShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"numShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"shareSalesUntilPriceUpdate\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n _defineProperty(this, \"shareSaleCooldown\", 0);\n\n _defineProperty(this, \"issueNewSharesCooldown\", 0);\n\n _defineProperty(this, \"dividendPercentage\", 0);\n\n _defineProperty(this, \"dividendTaxPercentage\", 50);\n\n _defineProperty(this, \"issuedShares\", 0);\n\n _defineProperty(this, \"sharePrice\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"state\", new _CorporationState__WEBPACK_IMPORTED_MODULE_0__[/* CorporationState */ \"a\"]());\n\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CorporationUnlockUpgrades */ \"a\"]).length;\n const numUpgrades = Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* CorporationUpgrades */ \"a\"]).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt) {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n\n this.funds = this.funds.plus(amt);\n }\n\n getState() {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1) {\n this.storedCycles += numCycles;\n }\n\n process(player) {\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n this.divisions.forEach(ind => {\n ind.process(marketCycles, state, this);\n }); // Process cooldowns\n\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n } //At the start of a new cycle, calculate profits from previous cycle\n\n\n if (state === \"START\") {\n this.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.divisions.forEach(ind => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n\n this.revenue = this.revenue.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"There was an error calculating your Corporations funds and they got reset to 0. \" + \"This is a bug. Please report to game developer.

\" + \"(Your funds have been set to $150b for the inconvenience)\");\n this.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9);\n } // Process dividends\n\n\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (isNaN(this.dividendPercentage) || this.dividendPercentage < 0 || this.dividendPercentage > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].DividendMaxPercentage * 100) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = this.dividendPercentage / 100 * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n determineValuation() {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\n\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds.toNumber() + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds.toNumber(), 0) / 3; //Base valuation\n\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n\n val -= val % 1e6; //Round down to nearest millionth\n }\n\n return val * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CorporationValuation;\n }\n\n getTargetSharePrice() {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice() {\n const targetPrice = this.getTargetSharePrice();\n\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice() {\n this.sharePrice = this.getTargetSharePrice();\n } // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n\n\n calculateShareSale(numShares) {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n const maxIterations = Math.ceil(numShares / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`);\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate; // Calculate what new share price would be\n\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd) {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n } //One time upgrades that unlock new features\n\n\n unlock(upgrade) {\n const upgN = upgrade[0],\n price = upgrade[1];\n\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n\n if (this.funds.lt(price)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to unlock this!\");\n return;\n }\n\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds.minus(price); // Apply effects for one-time upgrades\n\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n } //Levelable upgrades\n\n\n upgrade(upgrade) {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n\n if (this.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to purchase this!\");\n return;\n }\n\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(totalCost); //Increase upgrade multiplier\n\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt; //If storage size is being updated, update values in Warehouse objects\n\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_3__[/* Warehouse */ \"a\"]) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier() {\n const mult = this.upgradeMultipliers[0];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier() {\n const mult = this.upgradeMultipliers[1];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain() {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier() {\n const mult = this.upgradeMultipliers[3];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier() {\n const mult = this.upgradeMultipliers[4];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier() {\n const mult = this.upgradeMultipliers[5];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier() {\n const mult = this.upgradeMultipliers[6];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier() {\n const mult = this.upgradeMultipliers[7];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier() {\n const mult = this.upgradeMultipliers[8];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier() {\n const mult = this.upgradeMultipliers[9];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n } // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n\n\n getStarterGuide(player) {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__[/* isString */ \"a\"])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__[/* showLiterature */ \"a\"])(handbookFn);\n return;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"Corporation\", this);\n }\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(Corporation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.Corporation = Corporation;\n\n//# sourceURL=webpack:///./src/Corporation/Corporation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var _CorporationState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CorporationState */ 641);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./data/CorporationUpgrades */ 342);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Literature/LiteratureHelpers */ 431);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! decimal.js */ 77);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n // UI Related Imports\n\n\nclass Corporation {\n //A division/business sector is represented by the object:\n //Financial stats\n //Publicly traded\n // Total existing shares\n // Total shares owned by player\n // Game cycles until player can sell shares again\n // Game cycles until player can issue shares again\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"The Corporation\");\n\n _defineProperty(this, \"divisions\", []);\n\n _defineProperty(this, \"funds\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9));\n\n _defineProperty(this, \"revenue\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"expenses\", new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0));\n\n _defineProperty(this, \"fundingRound\", 0);\n\n _defineProperty(this, \"public\", false);\n\n _defineProperty(this, \"totalShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"numShares\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].INITIALSHARES);\n\n _defineProperty(this, \"shareSalesUntilPriceUpdate\", _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n _defineProperty(this, \"shareSaleCooldown\", 0);\n\n _defineProperty(this, \"issueNewSharesCooldown\", 0);\n\n _defineProperty(this, \"dividendPercentage\", 0);\n\n _defineProperty(this, \"dividendTaxPercentage\", 50);\n\n _defineProperty(this, \"issuedShares\", 0);\n\n _defineProperty(this, \"sharePrice\", 0);\n\n _defineProperty(this, \"storedCycles\", 0);\n\n _defineProperty(this, \"state\", new _CorporationState__WEBPACK_IMPORTED_MODULE_0__[/* CorporationState */ \"a\"]());\n\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CorporationUnlockUpgrades */ \"a\"]).length;\n const numUpgrades = Object.keys(_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* CorporationUpgrades */ \"a\"]).length;\n this.unlockUpgrades = Array(numUnlockUpgrades).fill(0);\n this.upgrades = Array(numUpgrades).fill(0);\n this.upgradeMultipliers = Array(numUpgrades).fill(1);\n }\n\n addFunds(amt) {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n\n this.funds = this.funds.plus(amt);\n }\n\n getState() {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1) {\n this.storedCycles += numCycles;\n }\n\n process(player) {\n if (this.storedCycles >= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n this.divisions.forEach(ind => {\n ind.process(marketCycles, state, this);\n }); // Process cooldowns\n\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n } //At the start of a new cycle, calculate profits from previous cycle\n\n\n if (state === \"START\") {\n this.revenue = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.expenses = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](0);\n this.divisions.forEach(ind => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n\n this.revenue = this.revenue.plus(ind.lastCycleRevenue);\n this.expenses = this.expenses.plus(ind.lastCycleExpenses);\n });\n const profit = this.revenue.minus(this.expenses);\n const cycleProfit = profit.times(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"There was an error calculating your Corporations funds and they got reset to 0. \" + \"This is a bug. Please report to game developer.

\" + \"(Your funds have been set to $150b for the inconvenience)\");\n this.funds = new decimal_js__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"](150e9);\n } // Process dividends\n\n\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (isNaN(this.dividendPercentage) || this.dividendPercentage < 0 || this.dividendPercentage > _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].DividendMaxPercentage * 100) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = this.dividendPercentage / 100 * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n const dividendsPerShare = totalDividends / this.totalShares;\n const profit = this.numShares * dividendsPerShare * (1 - this.dividendTaxPercentage / 100);\n player.gainMoney(profit);\n player.recordMoneySource(profit, \"corporation\");\n this.addFunds(retainedEarnings);\n }\n } else {\n this.addFunds(cycleProfit);\n }\n\n this.updateSharePrice();\n }\n\n this.state.nextState();\n }\n }\n\n determineValuation() {\n let val,\n profit = this.revenue.minus(this.expenses).toNumber();\n\n if (this.public) {\n // Account for dividends\n if (this.dividendPercentage > 0) {\n profit *= (100 - this.dividendPercentage) / 100;\n }\n\n val = this.funds.toNumber() + profit * 85e3;\n val *= Math.pow(1.1, this.divisions.length);\n val = Math.max(val, 0);\n } else {\n val = 10e9 + Math.max(this.funds.toNumber(), 0) / 3; //Base valuation\n\n if (profit > 0) {\n val += profit * 315e3;\n val *= Math.pow(1.1, this.divisions.length);\n } else {\n val = 10e9 * Math.pow(1.1, this.divisions.length);\n }\n\n val -= val % 1e6; //Round down to nearest millionth\n }\n\n return val * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CorporationValuation;\n }\n\n getTargetSharePrice() {\n // Note: totalShares - numShares is not the same as issuedShares because\n // issuedShares does not account for private investors\n return this.determineValuation() / (2 * (this.totalShares - this.numShares) + 1);\n }\n\n updateSharePrice() {\n const targetPrice = this.getTargetSharePrice();\n\n if (this.sharePrice <= targetPrice) {\n this.sharePrice *= 1 + Math.random() * 0.01;\n } else {\n this.sharePrice *= 1 - Math.random() * 0.01;\n }\n\n if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice() {\n this.sharePrice = this.getTargetSharePrice();\n } // Calculates how much money will be made and what the resulting stock price\n // will be when the player sells his/her shares\n // @return - [Player profit, final stock price, end shareSalesUntilPriceUpdate property]\n\n\n calculateShareSale(numShares) {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n const maxIterations = Math.ceil(numShares / _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE);\n\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(`Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`);\n return [0, 0, 0];\n }\n\n for (let i = 0; i < maxIterations; ++i) {\n if (sharesTracker < sharesUntilUpdate) {\n profit += sharePrice * sharesTracker;\n sharesUntilUpdate -= sharesTracker;\n break;\n } else {\n profit += sharePrice * sharesUntilUpdate;\n sharesUntilUpdate = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate; // Calculate what new share price would be\n\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd) {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n const SecondsPerMinute = 60;\n const SecondsPerHour = 3600;\n\n if (seconds > SecondsPerHour) {\n return `${Math.floor(seconds / SecondsPerHour)} hour(s)`;\n } else if (seconds > SecondsPerMinute) {\n return `${Math.floor(seconds / SecondsPerMinute)} minute(s)`;\n } else {\n return `${Math.floor(seconds)} second(s)`;\n }\n } //One time upgrades that unlock new features\n\n\n unlock(upgrade) {\n const upgN = upgrade[0],\n price = upgrade[1];\n\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n\n if (this.funds.lt(price)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to unlock this!\");\n return;\n }\n\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds.minus(price); // Apply effects for one-time upgrades\n\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n } //Levelable upgrades\n\n\n upgrade(upgrade) {\n const upgN = upgrade[0],\n basePrice = upgrade[1],\n priceMult = upgrade[2],\n upgradeAmt = upgrade[3]; //Amount by which the upgrade multiplier gets increased (additive)\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n\n if (this.funds.lt(totalCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough funds to purchase this!\");\n return;\n }\n\n ++this.upgrades[upgN];\n this.funds = this.funds.minus(totalCost); //Increase upgrade multiplier\n\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt; //If storage size is being updated, update values in Warehouse objects\n\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n\n for (const city in industry.warehouses) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_3__[/* Warehouse */ \"a\"]) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier() {\n const mult = this.upgradeMultipliers[0];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier() {\n const mult = this.upgradeMultipliers[1];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain() {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier() {\n const mult = this.upgradeMultipliers[3];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier() {\n const mult = this.upgradeMultipliers[4];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier() {\n const mult = this.upgradeMultipliers[5];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier() {\n const mult = this.upgradeMultipliers[6];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier() {\n const mult = this.upgradeMultipliers[7];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier() {\n const mult = this.upgradeMultipliers[8];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier() {\n const mult = this.upgradeMultipliers[9];\n\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n } // Adds the Corporation Handbook (Starter Guide) to the player's home computer.\n // This is a lit file that gives introductory info to the player\n // This occurs when the player clicks the \"Getting Started Guide\" button on the overview panel\n\n\n getStarterGuide(player) {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_7__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook;\n\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_10__[/* isString */ \"a\"])(homeComp.messages[i]) && homeComp.messages[i] === handbookFn) {\n hasHandbook = true;\n break;\n }\n }\n\n if (!hasHandbook) {\n homeComp.messages.push(handbookFn);\n }\n\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_6__[/* showLiterature */ \"a\"])(handbookFn);\n return;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"Corporation\", this);\n }\n /**\n * Initiatizes a Corporation object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(Corporation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.Corporation = Corporation;\n\n//# sourceURL=webpack:///./src/Corporation/Corporation.tsx?"); /***/ }), -/* 261 */, -/* 262 */ +/* 262 */, +/* 263 */ /*!**************************************!*\ !*** ./src/Bladeburner/Operation.ts ***! \**************************************/ @@ -2089,7 +2101,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Operation; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\nclass Operation extends _Action__WEBPACK_IMPORTED_MODULE_1__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n\n _defineProperty(this, \"reqdRank\", 100);\n\n _defineProperty(this, \"teamCount\", 0);\n\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n } // For actions that have teams. To be implemented by subtypes.\n\n\n getTeamSuccessBonus(inst) {\n if (this.teamCount && this.teamCount > 0) {\n this.teamCount = Math.min(this.teamCount, inst.teamSize);\n const teamMultiplier = Math.pow(this.teamCount, 0.05);\n return teamMultiplier;\n }\n\n return 1;\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst) {\n const city = inst.getCurrentCity();\n\n if (city.chaos > _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold) {\n const diff = 1 + (city.chaos - _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].ChaosThreshold);\n const mult = Math.pow(diff, 0.1);\n return mult;\n }\n\n return 1;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Operation\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Operation, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Operation = Operation;\n\n//# sourceURL=webpack:///./src/Bladeburner/Operation.ts?"); /***/ }), -/* 263 */ +/* 264 */ /*!******************************!*\ !*** ./src/NetscriptPort.ts ***! \******************************/ @@ -2101,7 +2113,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptPort; });\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Settings/Settings */ 34);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\nclass NetscriptPort {\n constructor() {\n _defineProperty(this, \"data\", []);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n write(data) {\n this.data.push(data);\n\n if (this.data.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return this.data.shift();\n }\n\n return null;\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n tryWrite(data) {\n if (this.data.length >= _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity) {\n return false;\n }\n\n this.data.push(data);\n return true;\n }\n\n read() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n }\n\n return this.data.shift();\n }\n\n peek() {\n if (this.data.length === 0) {\n return \"NULL PORT DATA\";\n } else {\n const foo = this.data.slice();\n return foo[0];\n }\n }\n\n full() {\n return this.data.length == _Settings_Settings__WEBPACK_IMPORTED_MODULE_0__[/* Settings */ \"a\"].MaxPortCapacity;\n }\n\n empty() {\n return this.data.length === 0;\n }\n\n clear() {\n this.data.length = 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/NetscriptPort.ts?"); /***/ }), -/* 264 */ +/* 265 */ /*!********************************!*\ !*** ./src/ui/React/Theme.tsx ***! \********************************/ @@ -2110,10 +2122,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return colors; });\n/* unused harmony export theme */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 477);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 1055);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/styles */ 1388);\n\n\nconst colors = {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\"\n};\nconst theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n palette: {\n primary: {\n light: colors.primarylight,\n main: colors.primary,\n dark: colors.primarydark\n },\n secondary: {\n light: colors.secondarylight,\n main: colors.secondary,\n dark: colors.secondarydark\n },\n error: {\n light: colors.errorlight,\n main: colors.error,\n dark: colors.errordark\n },\n info: {\n light: colors.infolight,\n main: colors.info,\n dark: colors.infodark\n },\n warning: {\n light: colors.warninglight,\n main: colors.warning,\n dark: colors.warningdark\n },\n background: {\n default: colors.black,\n paper: colors.well\n }\n },\n typography: {\n fontFamily: \"monospace\",\n button: {\n textTransform: \"none\"\n }\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n color: colors.primary\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: colors.primarydark\n }\n }\n }\n },\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n borderBottomColor: \"#fff\"\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: colors.primarydark\n },\n \"&:before\": {\n borderBottomColor: colors.primary\n },\n \"&:after\": {\n borderBottomColor: colors.primarylight\n }\n }\n }\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: colors.primarydark,\n // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: colors.primarylight\n }\n }\n }\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: \"#333\",\n border: \"1px solid \" + colors.well,\n // color: colors.primary,\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: colors.black\n },\n borderRadius: 0\n }\n }\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: colors.primary\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: colors.well\n }\n }\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\"\n }\n }\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: colors.black\n }\n }\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: colors.primary,\n backgroundColor: colors.well,\n borderRadius: 0,\n border: \"2px solid white\"\n }\n }\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: colors.primary,\n backgroundColor: colors.well\n }\n }\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\",\n // firefox\n backgroundColor: colors.black\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: colors.primarydark\n },\n track: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: colors.black,\n border: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: colors.primary\n }\n }\n }\n }\n});\nconst TTheme = ({\n children\n}) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n injectFirst: true\n}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n theme: theme\n}, children));\n\n//# sourceURL=webpack:///./src/ui/React/Theme.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return colors; });\n/* unused harmony export theme */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 477);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 1057);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/styles */ 1391);\n\n\nconst colors = {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n errorlight: \"#f00\",\n error: \"#c00\",\n errordark: \"#900\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\"\n};\nconst theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n palette: {\n primary: {\n light: colors.primarylight,\n main: colors.primary,\n dark: colors.primarydark\n },\n secondary: {\n light: colors.secondarylight,\n main: colors.secondary,\n dark: colors.secondarydark\n },\n error: {\n light: colors.errorlight,\n main: colors.error,\n dark: colors.errordark\n },\n info: {\n light: colors.infolight,\n main: colors.info,\n dark: colors.infodark\n },\n warning: {\n light: colors.warninglight,\n main: colors.warning,\n dark: colors.warningdark\n },\n background: {\n default: colors.black,\n paper: colors.well\n }\n },\n typography: {\n fontFamily: \"monospace\",\n button: {\n textTransform: \"none\"\n }\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n color: colors.primary\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: colors.primarydark\n }\n }\n }\n },\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: colors.well,\n borderBottomColor: \"#fff\"\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: colors.primarydark\n },\n \"&:before\": {\n borderBottomColor: colors.primary\n },\n \"&:after\": {\n borderBottomColor: colors.primarylight\n }\n }\n }\n },\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: colors.primarydark,\n // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: colors.primarylight\n }\n }\n }\n },\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: \"#333\",\n border: \"1px solid \" + colors.well,\n // color: colors.primary,\n margin: \"5px\",\n padding: \"3px 5px\",\n \"&:hover\": {\n backgroundColor: colors.black\n },\n borderRadius: 0\n }\n }\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: colors.primary\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: colors.well\n }\n }\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\"\n }\n }\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: colors.black\n }\n }\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: colors.primary,\n backgroundColor: colors.well,\n borderRadius: 0,\n border: \"2px solid white\"\n }\n }\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: colors.primary,\n backgroundColor: colors.well\n }\n }\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\",\n // firefox\n backgroundColor: colors.black\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: colors.primary\n }\n }\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: colors.primarydark\n },\n track: {\n backgroundColor: colors.welllight\n }\n }\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: colors.black,\n border: \"1px solid \" + colors.welllight\n }\n }\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: colors.primary\n }\n }\n }\n }\n});\nconst TTheme = ({\n children\n}) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n injectFirst: true\n}, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_styles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n theme: theme\n}, children));\n\n//# sourceURL=webpack:///./src/ui/React/Theme.tsx?"); /***/ }), -/* 265 */, /* 266 */, /* 267 */, /* 268 */, @@ -2121,7 +2132,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 270 */, /* 271 */, /* 272 */, -/* 273 */ +/* 273 */, +/* 274 */ /*!*****************************************************!*\ !*** ./src/Augmentation/PlayerOwnedAugmentation.ts ***! \*****************************************************/ @@ -2133,7 +2145,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerOwnedAugmentation; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass PlayerOwnedAugmentation {\n constructor(name = \"\") {\n _defineProperty(this, \"level\", 1);\n\n _defineProperty(this, \"name\", \"\");\n\n this.name = name;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts?"); /***/ }), -/* 274 */ +/* 275 */ /*!*************************!*\ !*** ./src/Prestige.js ***! \*************************/ @@ -2142,10 +2154,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prestigeSourceFile; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 40);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message/MessageHelpers */ 131);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Netscript/Pid */ 391);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BitNode8StartingMoney = 250e6; // Prestige by purchasing augmentation\n\nfunction prestigeAugmentation() {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n const megaCorpFactions = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"Omnitek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\"];\n const maintainMembership = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.filter(function (faction) {\n return megaCorpFactions.includes(faction);\n });\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeAugmentation(); // Delete all Worker Scripts objects\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])();\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Must be done before initForeignServers()\n // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp);\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].FTPCrackProgram.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].RelaySMTPProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot].owned) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].setMoney(1e6);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].BruteSSHProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].DeepscanV1.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].AutoLink.name);\n } // Re-create foreign servers\n\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer()); // Gain favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].gainFavor();\n }\n } // Gain favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].gainFavor();\n }\n } // Stop a Terminal action if there is onerror\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.concat(maintainMembership);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.map(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][f].isMember = true);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // Gang\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang.facName];\n\n if (faction instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ \"d\"])(faction);\n }\n } // Cancel Bladeburner action\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner.prestige();\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Reset Stock market\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } // Red Pill\n\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n var WorldDaemon = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].WorldDaemon]];\n var DaedalusServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].DaedalusServer]];\n\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.ip);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);\n }\n }\n\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n} // Prestige by destroying Bit Node and gaining a Source File\n\n\nfunction prestigeSourceFile(flume) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeSourceFile();\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])(); // Delete all Worker Scripts objects\n\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Must be done before initForeignServers()\n // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp); // Re-create foreign servers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer());\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n\n homeComp.cpuCores = 1; // Reset favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].favor = 0;\n }\n } // Reset favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].favor = 0;\n }\n } // Stop a Terminal action if there is one\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Delete all Augmentations\n\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n delete _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name];\n }\n } // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].augmentations.push({\n name: _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n level: _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12]\n });\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // BitNode 3: Corporatocracy\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 3) {\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"You received a copy of the Corporation Management Handbook on your home computer. \" + \"Read it if you need help getting started with Corporations!\");\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Bit Node 10: Digital Carbon\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 10) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n } // Reset Stock market, gang, and corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* deleteStockMarket */ \"d\"])();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) clearGangUI();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang = null;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].corporation = null;\n Object(_Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__[/* resetIndustryResearchTrees */ \"e\"])();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner = null; // Source-File 9 (level 3) effect\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 3) {\n const hserver = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].createHacknetServer();\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hacknet_node_money_mult);\n hserver.updateHashCapacity();\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n } // Gain int exp\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][5] !== 0 && !flume) _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gainIntelligenceExp(300);\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n}\n\n\n\n//# sourceURL=webpack:///./src/Prestige.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return prestigeSourceFile; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BitNode/BitNode */ 168);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Corporation/IndustryData */ 40);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Message/MessageHelpers */ 132);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Netscript/Pid */ 392);\n/* harmony import */ var _Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Literature/data/LiteratureNames */ 45);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../utils/DialogBox */ 10);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst BitNode8StartingMoney = 250e6; // Prestige by purchasing augmentation\n\nfunction prestigeAugmentation() {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n const megaCorpFactions = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"Omnitek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\"];\n const maintainMembership = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.filter(function (faction) {\n return megaCorpFactions.includes(faction);\n });\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeAugmentation(); // Delete all Worker Scripts objects\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])();\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Must be done before initForeignServers()\n // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp);\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].Neurolink].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].FTPCrackProgram.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].RelaySMTPProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].CashRoot].owned) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].setMoney(1e6);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].BruteSSHProgram.name);\n }\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].PCMatrix].owned) {\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].DeepscanV1.name);\n homeComp.programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"].AutoLink.name);\n } // Re-create foreign servers\n\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer()); // Gain favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].gainFavor();\n }\n } // Gain favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].gainFavor();\n }\n } // Stop a Terminal action if there is onerror\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.concat(maintainMembership);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].factions.map(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][f].isMember = true);\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // Gang\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang.facName];\n\n if (faction instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_9__[/* Faction */ \"a\"]) {\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_11__[/* joinFaction */ \"d\"])(faction);\n }\n } // Cancel Bladeburner action\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_4__[/* Bladeburner */ \"a\"]) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner.prestige();\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Reset Stock market\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } // Red Pill\n\n\n if (Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* augmentationExists */ \"b\"])(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill) && _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].TheRedPill].owned) {\n var WorldDaemon = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].WorldDaemon]];\n var DaedalusServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* SpecialServerNames */ \"b\"].DaedalusServer]];\n\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.ip);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.ip);\n }\n }\n\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n} // Prestige by destroying Bit Node and gaining a Source File\n\n\nfunction prestigeSourceFile(flume) {\n Object(_BitNode_BitNode__WEBPACK_IMPORTED_MODULE_3__[/* initBitNodeMultipliers */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n Object(_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* updateSourceFileFlags */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].prestigeSourceFile();\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_14__[/* prestigeWorkerScripts */ \"c\"])(); // Delete all Worker Scripts objects\n\n var homeComp = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer(); // Delete all servers except home computer\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* prestigeAllServers */ \"g\"])(); // Must be done before initForeignServers()\n // Delete Special Server IPs\n\n Object(_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_21__[/* prestigeSpecialServerIps */ \"e\"])(); // Reset home computer (only the programs) and add to AllServers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* AddToAllServers */ \"a\"])(homeComp);\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_19__[/* prestigeHomeComputer */ \"f\"])(homeComp); // Re-create foreign servers\n\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_18__[/* initForeignServers */ \"d\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].getHomeComputer());\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n\n homeComp.cpuCores = 1; // Reset favor for Companies\n\n for (var member in _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"]) {\n if (_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"].hasOwnProperty(member)) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* Companies */ \"a\"][member].favor = 0;\n }\n } // Reset favor for factions\n\n\n for (var member in _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"]) {\n if (_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"].hasOwnProperty(member)) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* Factions */ \"a\"][member].favor = 0;\n }\n } // Stop a Terminal action if there is one\n\n\n if (_engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress) {\n _engine__WEBPACK_IMPORTED_MODULE_8__[\"Engine\"]._actionInProgress = false;\n _Terminal__WEBPACK_IMPORTED_MODULE_23__[/* Terminal */ \"a\"].finishAction(true);\n } // Delete all Augmentations\n\n\n for (var name in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n if (_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"].hasOwnProperty(name)) {\n delete _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][name];\n }\n } // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].augmentations.push({\n name: _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor,\n level: _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][12]\n });\n } // Re-initialize things - This will update any changes\n\n\n Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_10__[/* initFactions */ \"c\"])(); // Factions must be initialized before augmentations\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* initAugmentations */ \"c\"])(); // Calls reapplyAllAugmentations() and resets Player multipliers\n\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].reapplyAllSourceFiles();\n Object(_Company_Companies__WEBPACK_IMPORTED_MODULE_5__[/* initCompanies */ \"b\"])(); // Messages\n\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_13__[/* initMessages */ \"c\"])(); // BitNode 3: Corporatocracy\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 3) {\n homeComp.messages.push(_Literature_data_LiteratureNames__WEBPACK_IMPORTED_MODULE_17__[/* LiteratureNames */ \"a\"].CorporationManagementHandbook);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"You received a copy of the Corporation Management Handbook on your home computer. \" + \"Read it if you need help getting started with Corporations!\");\n } // BitNode 8: Ghost of Wall Street\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].money = new decimal_js__WEBPACK_IMPORTED_MODULE_25__[/* default */ \"a\"](BitNode8StartingMoney);\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][8] > 0) {\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount = true;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasTixApiAccess = true;\n } // Bit Node 10: Digital Carbon\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bitNodeN === 10) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_24__[/* dialogBoxCreate */ \"a\"])(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n } // Reset Stock market, gang, and corporation\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hasWseAccount) {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initStockMarket */ \"f\"])();\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* initSymbolToStockMap */ \"h\"])();\n } else {\n Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_22__[/* deleteStockMarket */ \"d\"])();\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].inGang()) clearGangUI();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gang = null;\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].corporation = null;\n Object(_Corporation_IndustryData__WEBPACK_IMPORTED_MODULE_6__[/* resetIndustryResearchTrees */ \"e\"])();\n _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].bladeburner = null; // Source-File 9 (level 3) effect\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][9] >= 3) {\n const hserver = _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].createHacknetServer();\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].hacknet_node_money_mult);\n hserver.updateHashCapacity();\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_12__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"]);\n } // Gain int exp\n\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_20__[/* SourceFileFlags */ \"a\"][5] !== 0 && !flume) _Player__WEBPACK_IMPORTED_MODULE_15__[/* Player */ \"a\"].gainIntelligenceExp(300);\n Object(_Netscript_Pid__WEBPACK_IMPORTED_MODULE_16__[/* resetPidCounter */ \"b\"])();\n}\n\n\n\n//# sourceURL=webpack:///./src/Prestige.js?"); /***/ }), -/* 275 */ +/* 276 */ /*!****************************************!*\ !*** ./src/Company/CompanyPosition.ts ***! \****************************************/ @@ -2157,7 +2169,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyPosition; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/companypositionnames */ 24);\n\n\n/* tslint:disable:completed-docs */\n\nclass CompanyPosition {\n /**\n * Position title\n */\n\n /**\n * Title of next position to be promoted to\n */\n\n /**\n * Base salary for this position ($ per 200ms game cycle)\n * Will be multiplier by a company-specific multiplier for final salary\n */\n\n /**\n * Reputation multiplier\n */\n\n /**\n * Required stats to earn this position\n */\n\n /**\n * Required company reputation to earn this position\n */\n\n /**\n * Effectiveness of each stat time for job performance\n */\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n constructor(p) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n this.requiredHacking = p.reqdHacking != null ? p.reqdHacking : 0;\n this.requiredStrength = p.reqdStrength != null ? p.reqdStrength : 0;\n this.requiredDefense = p.reqdDefense != null ? p.reqdDefense : 0;\n this.requiredDexterity = p.reqdDexterity != null ? p.reqdDexterity : 0;\n this.requiredAgility = p.reqdAgility != null ? p.reqdAgility : 0;\n this.requiredCharisma = p.reqdCharisma != null ? p.reqdCharisma : 0;\n this.requiredReputation = p.reqdReputation != null ? p.reqdReputation : 0;\n this.hackingEffectiveness = p.hackingEffectiveness != null ? p.hackingEffectiveness : 0;\n this.strengthEffectiveness = p.strengthEffectiveness != null ? p.strengthEffectiveness : 0;\n this.defenseEffectiveness = p.defenseEffectiveness != null ? p.defenseEffectiveness : 0;\n this.dexterityEffectiveness = p.dexterityEffectiveness != null ? p.dexterityEffectiveness : 0;\n this.agilityEffectiveness = p.agilityEffectiveness != null ? p.agilityEffectiveness : 0;\n this.charismaEffectiveness = p.charismaEffectiveness != null ? p.charismaEffectiveness : 0;\n\n if (Math.round(this.hackingEffectiveness + this.strengthEffectiveness + this.defenseEffectiveness + this.dexterityEffectiveness + this.agilityEffectiveness + this.charismaEffectiveness) !== 100) {\n console.error(`CompanyPosition ${this.name} parameters do not sum to 100`);\n }\n\n this.hackingExpGain = p.hackingExpGain != null ? p.hackingExpGain : 0;\n this.strengthExpGain = p.strengthExpGain != null ? p.strengthExpGain : 0;\n this.defenseExpGain = p.defenseExpGain != null ? p.defenseExpGain : 0;\n this.dexterityExpGain = p.dexterityExpGain != null ? p.dexterityExpGain : 0;\n this.agilityExpGain = p.agilityExpGain != null ? p.agilityExpGain : 0;\n this.charismaExpGain = p.charismaExpGain != null ? p.charismaExpGain : 0;\n }\n\n calculateJobPerformance(hack, str, def, dex, agi, cha) {\n const hackRatio = this.hackingEffectiveness * hack / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const strRatio = this.strengthEffectiveness * str / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const defRatio = this.defenseEffectiveness * def / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const dexRatio = this.dexterityEffectiveness * dex / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const agiRatio = this.agilityEffectiveness * agi / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n const chaRatio = this.charismaEffectiveness * cha / _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].MaxSkillLevel;\n let reputationGain = this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio) / 100;\n\n if (isNaN(reputationGain)) {\n console.error(\"Company reputation gain calculated to be NaN\");\n reputationGain = 0;\n }\n\n return reputationGain;\n }\n\n isSoftwareJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareCompanyPositions */ \"j\"].includes(this.name);\n }\n\n isITJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* ITCompanyPositions */ \"d\"].includes(this.name);\n }\n\n isSecurityEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityEngineerCompanyPositions */ \"i\"].includes(this.name);\n }\n\n isNetworkEngineerJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* NetworkEngineerCompanyPositions */ \"f\"].includes(this.name);\n }\n\n isBusinessJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessCompanyPositions */ \"b\"].includes(this.name);\n }\n\n isSecurityJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SecurityCompanyPositions */ \"h\"].includes(this.name);\n }\n\n isAgentJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* AgentCompanyPositions */ \"a\"].includes(this.name);\n }\n\n isSoftwareConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* SoftwareConsultantCompanyPositions */ \"k\"].includes(this.name);\n }\n\n isBusinessConsultantJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* BusinessConsultantCompanyPositions */ \"c\"].includes(this.name);\n }\n\n isPartTimeJob() {\n return _data_companypositionnames__WEBPACK_IMPORTED_MODULE_1__[/* PartTimeCompanyPositions */ \"g\"].includes(this.name);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Company/CompanyPosition.ts?"); /***/ }), -/* 276 */ +/* 277 */ /*!*************************************!*\ !*** ./src/Script/RunningScript.ts ***! \*************************************/ @@ -2166,10 +2178,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RunningScript; });\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Fconf/FconfSettings */ 67);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 438);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\n\n\n\n\n\nclass RunningScript {\n // Script arguments\n // Map of [key: server ip] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Script filename\n // This script's logs. An array of log entries\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n // Total amount of hacking experience earned from this script when offline\n // Total amount of money made by this script when offline\n // Number of seconds that the script has been running offline\n // Total amount of hacking experience earned from this script when online\n // Total amount of money made by this script when online\n // Number of seconds that this script has been running online\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n // How much RAM this script uses for ONE thread\n // IP of the server on which this script is running\n // Number of threads that this script is running with\n constructor(script = null, args = []) {\n _defineProperty(this, \"args\", []);\n\n _defineProperty(this, \"dataMap\", {});\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"logUpd\", false);\n\n _defineProperty(this, \"offlineExpGained\", 0);\n\n _defineProperty(this, \"offlineMoneyMade\", 0);\n\n _defineProperty(this, \"offlineRunningTime\", 0.01);\n\n _defineProperty(this, \"onlineExpGained\", 0);\n\n _defineProperty(this, \"onlineMoneyMade\", 0);\n\n _defineProperty(this, \"onlineRunningTime\", 0.01);\n\n _defineProperty(this, \"pid\", -1);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n _defineProperty(this, \"threads\", 1);\n\n if (script == null) {\n return;\n }\n\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n }\n\n log(txt) {\n if (this.logs.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__[/* Settings */ \"a\"].MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].ENABLE_TIMESTAMPS) {\n logEntry = \"[\" + Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__[/* getTimestamp */ \"a\"])() + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog() {\n for (let i = 0; i < this.logs.length; ++i) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(this.logs[i]);\n }\n }\n\n clearLog() {\n this.logs.length = 0;\n } // Update the moneyStolen and numTimesHack maps when hacking\n\n\n recordHack(serverIp, moneyGained, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][0] += moneyGained;\n this.dataMap[serverIp][1] += n;\n } // Update the grow map when calling grow()\n\n\n recordGrow(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][2] += n;\n } // Update the weaken map when calling weaken() {\n\n\n recordWeaken(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][3] += n;\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"RunningScript\", this);\n } // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(RunningScript, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.RunningScript = RunningScript;\n\n//# sourceURL=webpack:///./src/Script/RunningScript.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RunningScript; });\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Fconf/FconfSettings */ 67);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/getTimestamp */ 439);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\n\n\n\n\n\nclass RunningScript {\n // Script arguments\n // Map of [key: server ip] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n // Script filename\n // This script's logs. An array of log entries\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n // Total amount of hacking experience earned from this script when offline\n // Total amount of money made by this script when offline\n // Number of seconds that the script has been running offline\n // Total amount of hacking experience earned from this script when online\n // Total amount of money made by this script when online\n // Number of seconds that this script has been running online\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n // How much RAM this script uses for ONE thread\n // IP of the server on which this script is running\n // Number of threads that this script is running with\n constructor(script = null, args = []) {\n _defineProperty(this, \"args\", []);\n\n _defineProperty(this, \"dataMap\", {});\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"logs\", []);\n\n _defineProperty(this, \"logUpd\", false);\n\n _defineProperty(this, \"offlineExpGained\", 0);\n\n _defineProperty(this, \"offlineMoneyMade\", 0);\n\n _defineProperty(this, \"offlineRunningTime\", 0.01);\n\n _defineProperty(this, \"onlineExpGained\", 0);\n\n _defineProperty(this, \"onlineMoneyMade\", 0);\n\n _defineProperty(this, \"onlineRunningTime\", 0.01);\n\n _defineProperty(this, \"pid\", -1);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n _defineProperty(this, \"threads\", 1);\n\n if (script == null) {\n return;\n }\n\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n }\n\n log(txt) {\n if (this.logs.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_1__[/* Settings */ \"a\"].MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].ENABLE_TIMESTAMPS) {\n logEntry = \"[\" + Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_4__[/* getTimestamp */ \"a\"])() + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog() {\n for (let i = 0; i < this.logs.length; ++i) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(this.logs[i]);\n }\n }\n\n clearLog() {\n this.logs.length = 0;\n } // Update the moneyStolen and numTimesHack maps when hacking\n\n\n recordHack(serverIp, moneyGained, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][0] += moneyGained;\n this.dataMap[serverIp][1] += n;\n } // Update the grow map when calling grow()\n\n\n recordGrow(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][2] += n;\n } // Update the weaken map when calling weaken() {\n\n\n recordWeaken(serverIp, n = 1) {\n if (this.dataMap[serverIp] == null || this.dataMap[serverIp].constructor !== Array) {\n this.dataMap[serverIp] = [0, 0, 0, 0];\n }\n\n this.dataMap[serverIp][3] += n;\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"RunningScript\", this);\n } // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(RunningScript, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.RunningScript = RunningScript;\n\n//# sourceURL=webpack:///./src/Script/RunningScript.ts?"); /***/ }), -/* 277 */ +/* 278 */ /*!***************************************!*\ !*** ./src/SourceFile/SourceFiles.ts ***! \***************************************/ @@ -2178,10 +2190,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFile */ 202);\n\nconst SourceFiles = {};\nSourceFiles[\"SourceFile1\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](1, \"This Source-File lets the player start with 32GB of RAM on his/her \" + \"home computer. It also increases all of the player's multipliers by:

\" + \"Level 1: 16%
\" + \"Level 2: 24%
\" + \"Level 3: 28%\");\nSourceFiles[\"SourceFile2\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](2, \"This Source-File allows you to form gangs in other BitNodes \" + \"once your karma decreases to a certain value. It also increases the player's \" + \"crime success rate, crime money, and charisma multipliers by:

\" + \"Level 1: 24%
\" + \"Level 2: 36%
\" + \"Level 3: 42%\");\nSourceFiles[\"SourceFile3\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](3, \"This Source-File lets you create corporations on other BitNodes (although \" + \"some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile4\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](4, \"This Source-File lets you access and use the Singularity Functions in every BitNode. Every \" + \"level of this Source-File opens up more of the Singularity Functions you can use.\");\nSourceFiles[\"SourceFile5\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](5, \"This Source-File grants a special new stat called Intelligence. Intelligence \" + \"is unique because it is permanent and persistent (it never gets reset back to 1). However, \" + \"gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't \" + \"know when you gain experience and how much). Higher Intelligence levels will boost your production \" + \"for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() \" + \"and getServer() Netscript functions, as well as the formulas API, and will raise all of your \" + \"hacking-related multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile6\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](6, \"This Source-File allows you to access the NSA's Bladeburner Division in other \" + \"BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile7\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](7, \"This Source-File allows you to access the Bladeburner Netscript API in other \" + \"BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile8\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](8, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanent access to WSE and TIX API
\" + \"Level 2: Ability to short stocks in other BitNodes
\" + \"Level 3: Ability to use limit/stop orders in other BitNodes

\" + \"This Source-File also increases your hacking growth multipliers by: \" + \"
Level 1: 12%
Level 2: 18%
Level 3: 21%\");\nSourceFiles[\"SourceFile9\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](9, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanently unlocks the Hacknet Server in other BitNodes
\" + \"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode
\" + \"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode

\" + \"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT \" + \"when installing Augmentations)\");\nSourceFiles[\"SourceFile10\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](10, \"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this \" + \"Source-File also grants you a Duplicate Sleeve\");\nSourceFiles[\"SourceFile11\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](11, \"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate \" + \"at that company by 1% per favor (rather than just the reputation gain). This Source-File also \" + \" increases the player's company salary and reputation gain multipliers by:

\" + \"Level 1: 32%
\" + \"Level 2: 48%
\" + \"Level 3: 56%

\" + \"It also reduces the price increase for every aug bought by:

\" + \"Level 1: 4%
\" + \"Level 2: 6%
\" + \"Level 3: 7%\");\nSourceFiles[\"SourceFile12\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](12, \"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.\");\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFiles.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var _SourceFile__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFile */ 203);\n\nconst SourceFiles = {};\nSourceFiles[\"SourceFile1\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](1, \"This Source-File lets the player start with 32GB of RAM on his/her \" + \"home computer. It also increases all of the player's multipliers by:

\" + \"Level 1: 16%
\" + \"Level 2: 24%
\" + \"Level 3: 28%\");\nSourceFiles[\"SourceFile2\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](2, \"This Source-File allows you to form gangs in other BitNodes \" + \"once your karma decreases to a certain value. It also increases the player's \" + \"crime success rate, crime money, and charisma multipliers by:

\" + \"Level 1: 24%
\" + \"Level 2: 36%
\" + \"Level 3: 42%\");\nSourceFiles[\"SourceFile3\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](3, \"This Source-File lets you create corporations on other BitNodes (although \" + \"some BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers by:
\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile4\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](4, \"This Source-File lets you access and use the Singularity Functions in every BitNode. Every \" + \"level of this Source-File opens up more of the Singularity Functions you can use.\");\nSourceFiles[\"SourceFile5\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](5, \"This Source-File grants a special new stat called Intelligence. Intelligence \" + \"is unique because it is permanent and persistent (it never gets reset back to 1). However, \" + \"gaining Intelligence experience is much slower than other stats, and it is also hidden (you won't \" + \"know when you gain experience and how much). Higher Intelligence levels will boost your production \" + \"for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() \" + \"and getServer() Netscript functions, as well as the formulas API, and will raise all of your \" + \"hacking-related multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile6\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](6, \"This Source-File allows you to access the NSA's Bladeburner Division in other \" + \"BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your combat stats by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile7\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](7, \"This Source-File allows you to access the Bladeburner Netscript API in other \" + \"BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:

\" + \"Level 1: 8%
\" + \"Level 2: 12%
\" + \"Level 3: 14%\");\nSourceFiles[\"SourceFile8\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](8, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanent access to WSE and TIX API
\" + \"Level 2: Ability to short stocks in other BitNodes
\" + \"Level 3: Ability to use limit/stop orders in other BitNodes

\" + \"This Source-File also increases your hacking growth multipliers by: \" + \"
Level 1: 12%
Level 2: 18%
Level 3: 21%\");\nSourceFiles[\"SourceFile9\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](9, \"This Source-File grants the following benefits:

\" + \"Level 1: Permanently unlocks the Hacknet Server in other BitNodes
\" + \"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode
\" + \"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode

\" + \"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT \" + \"when installing Augmentations)\");\nSourceFiles[\"SourceFile10\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](10, \"This Source-File unlocks Sleeve technology in other BitNodes. Each level of this \" + \"Source-File also grants you a Duplicate Sleeve\");\nSourceFiles[\"SourceFile11\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](11, \"This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate \" + \"at that company by 1% per favor (rather than just the reputation gain). This Source-File also \" + \" increases the player's company salary and reputation gain multipliers by:

\" + \"Level 1: 32%
\" + \"Level 2: 48%
\" + \"Level 3: 56%

\" + \"It also reduces the price increase for every aug bought by:

\" + \"Level 1: 4%
\" + \"Level 2: 6%
\" + \"Level 3: 7%\");\nSourceFiles[\"SourceFile12\"] = new _SourceFile__WEBPACK_IMPORTED_MODULE_0__[/* SourceFile */ \"a\"](12, \"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.\");\n\n//# sourceURL=webpack:///./src/SourceFile/SourceFiles.ts?"); /***/ }), -/* 278 */ +/* 279 */ /*!***************************!*\ !*** ./src/Casino/RNG.ts ***! \***************************/ @@ -2193,11 +2205,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BadRNG; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return WHRNG; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/*\n * very bad RNG, meant to be used as introduction to RNG manipulation. It has a\n * period of 1024.\n */\nclass RNG0 {\n constructor() {\n _defineProperty(this, \"m\", 1024);\n\n _defineProperty(this, \"a\", 341);\n\n _defineProperty(this, \"c\", 1);\n\n this.x = 0;\n this.reset();\n }\n\n step() {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random() {\n this.step();\n return this.x / this.m;\n }\n\n reset() {\n this.x = new Date().getTime() % this.m;\n }\n\n}\n\nconst BadRNG = new RNG0();\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\n\nclass WHRNG {\n constructor(totalPlaytime) {\n _defineProperty(this, \"s1\", 0);\n\n _defineProperty(this, \"s2\", 0);\n\n _defineProperty(this, \"s3\", 0);\n\n // This one is seeded by the players total play time.\n const v = totalPlaytime / 1000 % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step() {\n this.s1 = 171 * this.s1 % 30269;\n this.s2 = 172 * this.s2 % 30307;\n this.s3 = 170 * this.s3 % 30323;\n }\n\n random() {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/RNG.ts?"); /***/ }), -/* 279 */, /* 280 */, /* 281 */, /* 282 */, -/* 283 */ +/* 283 */, +/* 284 */ /*!*****************************!*\ !*** ./src/Casino/Game.tsx ***! \*****************************/ @@ -2209,7 +2221,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nconst gainLimit = 10e9;\nclass Game extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n win(p, n) {\n p.gainMoney(n);\n p.recordMoneySource(n, \"casino\");\n }\n\n reachedLimit(p) {\n const reached = p.getCasinoWinnings() > gainLimit;\n\n if (reached) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Alright cheater get out of here. You're not allowed here anymore.\"));\n }\n\n return reached;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Game.tsx?"); /***/ }), -/* 284 */ +/* 285 */ /*!****************************************!*\ !*** ./src/Corporation/ResearchMap.ts ***! \****************************************/ @@ -2221,7 +2233,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResearchMap; });\n/* harmony import */ var _Research__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Research */ 648);\n/* harmony import */ var _data_ResearchMetadata__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/ResearchMetadata */ 649);\n// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\n\n\nconst ResearchMap = {};\n\nfunction addResearch(p) {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n\n ResearchMap[p.name] = new _Research__WEBPACK_IMPORTED_MODULE_0__[/* Research */ \"a\"](p);\n}\n\nfor (const metadata of _data_ResearchMetadata__WEBPACK_IMPORTED_MODULE_1__[/* researchMetadata */ \"a\"]) {\n addResearch(metadata);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ResearchMap.ts?"); /***/ }), -/* 285 */ +/* 286 */ /*!******************************!*\ !*** ./src/Script/Script.ts ***! \******************************/ @@ -2230,10 +2242,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Script; });\n/* harmony import */ var _RamCalculations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RamCalculations */ 432);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 309);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\n\n\n\n\nlet globalModuleSequenceNumber = 0;\nclass Script {\n // Code for this script\n // Filename for the script file\n // url of the script if any, only for NS2.\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n // Amount of RAM this Script requres to run\n // IP of server that this script is on.\n constructor(fn = \"\", code = \"\", server = \"\", otherScripts = []) {\n _defineProperty(this, \"code\", \"\");\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"url\", \"\");\n\n _defineProperty(this, \"module\", \"\");\n\n _defineProperty(this, \"dependencies\", []);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // IP of server this script is on\n\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n\n if (this.code !== \"\") {\n this.updateRamUsage(otherScripts);\n }\n }\n /**\n * Download the script as a file\n */\n\n\n download() {\n const filename = this.filename + \".js\";\n const file = new Blob([this.code], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n\n\n markUpdated() {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n saveScript(code, serverIp, otherScripts) {\n // Update code and filename\n this.code = code.replace(/^\\s+|\\s+$/g, \"\");\n const filenameElem = document.getElementById(\"script-editor-filename\");\n\n if (filenameElem == null) {\n console.error(`Failed to get Script filename DOM element`);\n return;\n }\n\n this.filename = filenameElem.value;\n this.server = serverIp;\n this.updateRamUsage(otherScripts);\n this.markUpdated();\n }\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n async updateRamUsage(otherScripts) {\n const res = await Object(_RamCalculations__WEBPACK_IMPORTED_MODULE_0__[/* calculateRamUsage */ \"a\"])(this.code, otherScripts);\n\n if (res > 0) {\n this.ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__[/* roundToTwo */ \"a\"])(res);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Script\", this);\n } // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Script, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Script = Script;\n\n//# sourceURL=webpack:///./src/Script/Script.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Script; });\n/* harmony import */ var _RamCalculations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./RamCalculations */ 433);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/roundToTwo */ 311);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Class representing a script file.\n *\n * This does NOT represent a script that is actively running and\n * being evaluated. See RunningScript for that\n */\n\n\n\n\nlet globalModuleSequenceNumber = 0;\nclass Script {\n // Code for this script\n // Filename for the script file\n // url of the script if any, only for NS2.\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n // Only used with NS2 scripts; the list of dependency script filenames. This is constructed\n // whenever the script is first evaluated, and therefore may be out of date if the script\n // has been updated since it was last run.\n // Amount of RAM this Script requres to run\n // IP of server that this script is on.\n constructor(fn = \"\", code = \"\", server = \"\", otherScripts = []) {\n _defineProperty(this, \"code\", \"\");\n\n _defineProperty(this, \"filename\", \"\");\n\n _defineProperty(this, \"url\", \"\");\n\n _defineProperty(this, \"module\", \"\");\n\n _defineProperty(this, \"dependencies\", []);\n\n _defineProperty(this, \"ramUsage\", 0);\n\n _defineProperty(this, \"server\", \"\");\n\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // IP of server this script is on\n\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n\n if (this.code !== \"\") {\n this.updateRamUsage(otherScripts);\n }\n }\n /**\n * Download the script as a file\n */\n\n\n download() {\n const filename = this.filename + \".js\";\n const file = new Blob([this.code], {\n type: \"text/plain\"\n });\n\n if (window.navigator.msSaveOrOpenBlob) {\n // IE10+\n window.navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a = document.createElement(\"a\"),\n url = URL.createObjectURL(file);\n a.href = url;\n a.download = filename;\n document.body.appendChild(a);\n a.click();\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n /**\n * Marks this script as having been updated. It will be recompiled next time something tries\n * to exec it.\n */\n\n\n markUpdated() {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\n /**\n * Save a script from the script editor\n * @param {string} code - The new contents of the script\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n saveScript(code, serverIp, otherScripts) {\n // Update code and filename\n this.code = code.replace(/^\\s+|\\s+$/g, \"\");\n const filenameElem = document.getElementById(\"script-editor-filename\");\n\n if (filenameElem == null) {\n console.error(`Failed to get Script filename DOM element`);\n return;\n }\n\n this.filename = filenameElem.value;\n this.server = serverIp;\n this.updateRamUsage(otherScripts);\n this.markUpdated();\n }\n /**\n * Calculates and updates the script's RAM usage based on its code\n * @param {Script[]} otherScripts - Other scripts on the server. Used to process imports\n */\n\n\n async updateRamUsage(otherScripts) {\n const res = await Object(_RamCalculations__WEBPACK_IMPORTED_MODULE_0__[/* calculateRamUsage */ \"a\"])(this.code, otherScripts);\n\n if (res > 0) {\n this.ramUsage = Object(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_3__[/* roundToTwo */ \"a\"])(res);\n }\n } // Serialize the current object to a JSON save state\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Script\", this);\n } // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Script, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Script = Script;\n\n//# sourceURL=webpack:///./src/Script/Script.ts?"); /***/ }), -/* 286 */ +/* 287 */ /*!************************************************!*\ !*** ./utils/uiHelpers/clearEventListeners.ts ***! \************************************************/ @@ -2242,10 +2254,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return clearEventListeners; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 209);\n\n/**\n * Given an element by its ID, removes all event listeners from that element by cloning and\n * replacing. Then returns the new cloned element.\n * @param elemId The HTML ID to retrieve the element by.\n */\n\nfunction clearEventListeners(elemId) {\n try {\n let elem;\n\n if (typeof elemId === \"string\") {\n elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(elemId);\n } else {\n elem = elemId;\n }\n\n const newElem = elem.cloneNode(true);\n\n if (elem.parentNode !== null) {\n elem.parentNode.replaceChild(newElem, elem);\n }\n\n return newElem;\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.error(e);\n return null;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/clearEventListeners.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return clearEventListeners; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n\n/**\n * Given an element by its ID, removes all event listeners from that element by cloning and\n * replacing. Then returns the new cloned element.\n * @param elemId The HTML ID to retrieve the element by.\n */\n\nfunction clearEventListeners(elemId) {\n try {\n let elem;\n\n if (typeof elemId === \"string\") {\n elem = Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(elemId);\n } else {\n elem = elemId;\n }\n\n const newElem = elem.cloneNode(true);\n\n if (elem.parentNode !== null) {\n elem.parentNode.replaceChild(newElem, elem);\n }\n\n return newElem;\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.error(e);\n return null;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/clearEventListeners.ts?"); /***/ }), -/* 287 */ +/* 288 */ /*!************************************!*\ !*** ./src/Hacknet/HashManager.ts ***! \************************************/ @@ -2254,10 +2266,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashManager; });\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HashUpgrades */ 216);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\n\n\nclass HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n // Number of hashes currently in storage\n // Map of Hash Upgrade Name -> levels in that upgrade\n constructor() {\n _defineProperty(this, \"capacity\", 0);\n\n _defineProperty(this, \"hashes\", 0);\n\n _defineProperty(this, \"upgrades\", {});\n\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n }\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n\n\n getMult(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + upg.value * currLevel / 100;\n }\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n\n\n getStudyMult() {\n const upgName = \"Improve Studying\";\n return this.getMult(upgName);\n }\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n\n\n getTrainingMult() {\n const upgName = \"Improve Gym Training\";\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n\n return upg;\n }\n /**\n * Get the cost (in hashes) of an upgrade\n */\n\n\n getUpgradeCost(upgName) {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige() {\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n\n this.hashes = 0; // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n\n this.updateCapacity(0);\n }\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n\n\n refundUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName]; // Reduce the level first, so we get the right cost\n\n --this.upgrades[upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n storeHashes(numHashes) {\n this.hashes += numHashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n }\n\n updateCapacity(newCap) {\n if (newCap < 0) {\n this.capacity = 0;\n }\n\n this.capacity = Math.max(newCap, 0);\n }\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n\n\n upgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n return true;\n } //Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"HashManager\", this);\n } // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(HashManager, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.HashManager = HashManager;\n\n//# sourceURL=webpack:///./src/Hacknet/HashManager.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashManager; });\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./HashUpgrades */ 217);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * This is a central class for storing and managing the player's hashes,\n * which are generated by Hacknet Servers\n *\n * It is also used to keep track of what upgrades the player has bought with\n * his hashes, and contains method for grabbing the data/multipliers from\n * those upgrades\n */\n\n\nclass HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n // Number of hashes currently in storage\n // Map of Hash Upgrade Name -> levels in that upgrade\n constructor() {\n _defineProperty(this, \"capacity\", 0);\n\n _defineProperty(this, \"hashes\", 0);\n\n _defineProperty(this, \"upgrades\", {});\n\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n }\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n\n\n getMult(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Could not find Hash Study upgrade`);\n return 1;\n }\n\n return 1 + upg.value * currLevel / 100;\n }\n /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n\n\n getStudyMult() {\n const upgName = \"Improve Studying\";\n return this.getMult(upgName);\n }\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n\n\n getTrainingMult() {\n const upgName = \"Improve Gym Training\";\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n\n return upg;\n }\n /**\n * Get the cost (in hashes) of an upgrade\n */\n\n\n getUpgradeCost(upgName) {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgradeCost(): ${upgName}`);\n return Infinity;\n }\n\n return upg.getCost(currLevel);\n }\n\n prestige() {\n for (const name in _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"]) {\n this.upgrades[name] = 0;\n }\n\n this.hashes = 0; // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n\n this.updateCapacity(0);\n }\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n\n\n refundUpgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName]; // Reduce the level first, so we get the right cost\n\n --this.upgrades[upgName];\n const currLevel = this.upgrades[upgName];\n\n if (upg == null || currLevel == null || currLevel < 0) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return;\n }\n\n const cost = upg.getCost(currLevel);\n this.hashes += cost;\n }\n\n storeHashes(numHashes) {\n this.hashes += numHashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n }\n\n updateCapacity(newCap) {\n if (newCap < 0) {\n this.capacity = 0;\n }\n\n this.capacity = Math.max(newCap, 0);\n }\n /**\n * Returns boolean indicating whether or not the upgrade was successfully purchased\n * Note that this does NOT actually implement the effect\n */\n\n\n upgrade(upgName) {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_0__[/* HashUpgrades */ \"a\"][upgName];\n\n if (upg == null) {\n console.error(`Invalid Upgrade Name given to HashManager.upgrade(): ${upgName}`);\n return false;\n }\n\n const cost = this.getUpgradeCost(upgName);\n\n if (this.hashes < cost) {\n return false;\n }\n\n this.hashes -= cost;\n ++this.upgrades[upgName];\n return true;\n } //Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"HashManager\", this);\n } // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(HashManager, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.HashManager = HashManager;\n\n//# sourceURL=webpack:///./src/Hacknet/HashManager.ts?"); /***/ }), -/* 288 */ +/* 289 */ /*!****************************************!*\ !*** ./src/CodingContractGenerator.ts ***! \****************************************/ @@ -2269,7 +2281,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return generateRandomContract; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return generateRandomContractOnHome; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateContract; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CodingContracts */ 79);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Server/Server */ 92);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/helpers/getRandomInt */ 18);\n\n\n\n\n\n\n\n\nfunction generateRandomContract() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const randServer = getRandomServer();\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n randServer.addContract(contract);\n}\nfunction generateRandomContractOnHome() {\n // First select a random problem type\n const problemType = getRandomProblemType(); // Then select a random reward type. 'Money' will always be the last reward type\n\n const reward = getRandomReward(); // Choose random server\n\n const serv = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].getHomeComputer();\n const contractFn = getRandomFilename(serv, reward);\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](contractFn, problemType, reward);\n serv.addContract(contract);\n}\nfunction generateContract(params) {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n } // Reward Type - This is always random for now\n\n\n const reward = getRandomReward(); // Server\n\n let server;\n\n if (params.server != null) {\n server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_4__[/* GetServerByHostname */ \"a\"])(params.server);\n\n if (server == null) {\n server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][params.server];\n }\n\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n } // Filename\n\n\n let fn;\n\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"](fn, problemType, reward);\n server.addContract(contract);\n} // Ensures that a contract's reward type is valid\n\nfunction sanitizeRewardType(rewardType) {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation;\n }\n\n if (type === _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation && Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs).length === 0) {\n type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType() {\n const problemTypes = Object.keys(_CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractTypes */ \"d\"]);\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, problemTypes.length - 1);\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward() {\n const reward = {\n name: \"\",\n type: Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money)\n };\n reward.type = sanitizeRewardType(reward.type); // Add additional information based on the reward type\n\n const factionsThatAllowHacking = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].factions.filter(fac => {\n try {\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][fac].getInfo().offerHackingWork;\n } catch (e) {\n console.error(`Error when trying to filter Hacking Factions for Coding Contract Generation: ${e}`);\n return false;\n }\n });\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n {\n // Get a random faction that player is a part of. That\n // faction must allow hacking contracts\n const numFactions = factionsThatAllowHacking.length;\n const randFaction = factionsThatAllowHacking[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n {\n const allJobs = Object.keys(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].jobs);\n\n if (allJobs.length > 0) {\n reward.name = allJobs[Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, allJobs.length - 1)];\n } else {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContractRewardType */ \"c\"].Money;\n }\n\n break;\n }\n\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer() {\n const servers = Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"]);\n let randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n let randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]]; // An infinite loop shouldn't ever happen, but to be safe we'll use\n // a for loop with a limited number of tries\n\n for (let i = 0; i < 200; ++i) {\n if (randServer instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_6__[/* Server */ \"a\"] && !randServer.purchasedByPlayer && randServer.hostname !== _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_5__[/* SpecialServerNames */ \"b\"].WorldDaemon) {\n break;\n }\n\n randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, servers.length - 1);\n randServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_3__[/* AllServers */ \"b\"][servers[randIndex]];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server, reward) {\n let contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (server.contracts.filter(c => {\n return c.fn === contractFn;\n }).length <= 0) {\n break;\n }\n\n contractFn = `contract-${Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n\n//# sourceURL=webpack:///./src/CodingContractGenerator.ts?"); /***/ }), -/* 289 */ +/* 290 */ /*!****************************************!*\ !*** ./src/Corporation/OfficeSpace.ts ***! \****************************************/ @@ -2278,10 +2290,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OfficeSpace; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Employee */ 353);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass OfficeSpace {\n constructor(params = {}) {\n _defineProperty(this, \"minEne\", 0);\n\n _defineProperty(this, \"maxEne\", 100);\n\n _defineProperty(this, \"minHap\", 0);\n\n _defineProperty(this, \"maxHap\", 100);\n\n _defineProperty(this, \"maxMor\", 100);\n\n _defineProperty(this, \"employees\", []);\n\n _defineProperty(this, \"employeeProd\", {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: 0,\n total: 0\n });\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity() {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation, industry) {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Training;\n }\n } // Process Office properties\n\n\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n } // Calculate changes in Morale/Happiness/Energy for Employees\n\n\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n const hasAutobrew = industry.hasResearch(\"AutoBrew\");\n const hasAutoparty = industry.hasResearch(\"AutoPartyManager\");\n let salaryPaid = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\n\n if (hasAutoparty) {\n emp.mor = this.maxMor;\n emp.hap = this.maxHap;\n } else {\n emp.mor *= perfMult;\n emp.hap *= perfMult;\n emp.mor = Math.min(emp.mor, this.maxMor);\n emp.hap = Math.min(emp.hap, this.maxHap);\n }\n\n if (hasAutobrew) {\n emp.ene = this.maxEne;\n } else {\n emp.ene *= perfMult;\n emp.ene = Math.min(emp.ene, this.maxEne);\n }\n\n const salary = emp.process(marketCycles, this);\n salaryPaid += salary;\n }\n\n this.calculateEmployeeProductivity(corporation, industry);\n return salaryPaid;\n }\n\n calculateEmployeeProductivity(corporation, industry) {\n //Reset\n for (const name in this.employeeProd) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee() {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return; //Generate three random employees (meh, decent, amazing)\n\n const mult = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n sal = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp = new _Employee__WEBPACK_IMPORTED_MODULE_5__[/* Employee */ \"a\"]({\n intelligence: int * mult,\n charisma: cha * mult,\n experience: exp * mult,\n creativity: cre * mult,\n efficiency: eff * mult,\n salary: sal * mult\n });\n const name = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* generateRandomString */ \"d\"])(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n\n emp.name = name;\n this.employees.push(emp);\n return emp;\n } //Finds the first unassigned employee and assigns its to the specified job\n\n\n assignEmployeeToJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n\n return false;\n } //Finds the first employee with the given job and unassigns it\n\n\n unassignEmployeeFromJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned;\n return true;\n }\n }\n\n return false;\n }\n\n copy() {\n const office = new OfficeSpace();\n office.loc = this.loc;\n office.size = this.size;\n office.minEne = this.minEne;\n office.maxEne = this.maxEne;\n office.minHap = this.minHap;\n office.maxHap = this.maxHap;\n office.maxMor = this.maxMor;\n office.employeeProd = {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD],\n total: this.employeeProd[\"total\"]\n };\n office.employees = [];\n\n for (const employee of this.employees) {\n office.employees.push(employee.copy());\n }\n\n return office;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"OfficeSpace\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(OfficeSpace, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.OfficeSpace = OfficeSpace;\n\n//# sourceURL=webpack:///./src/Corporation/OfficeSpace.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OfficeSpace; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Employee */ 355);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass OfficeSpace {\n constructor(params = {}) {\n _defineProperty(this, \"minEne\", 0);\n\n _defineProperty(this, \"maxEne\", 100);\n\n _defineProperty(this, \"minHap\", 0);\n\n _defineProperty(this, \"maxHap\", 100);\n\n _defineProperty(this, \"maxMor\", 100);\n\n _defineProperty(this, \"employees\", []);\n\n _defineProperty(this, \"employeeProd\", {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: 0,\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: 0,\n total: 0\n });\n\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity() {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation, industry) {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Training;\n }\n } // Process Office properties\n\n\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n } // Calculate changes in Morale/Happiness/Energy for Employees\n\n\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\n\n if (corporation.funds < 0 && industry.lastCycleRevenue < 0) {\n perfMult = Math.pow(0.99, marketCycles);\n } else if (corporation.funds > 0 && industry.lastCycleRevenue > 0) {\n perfMult = Math.pow(1.01, marketCycles);\n }\n\n const hasAutobrew = industry.hasResearch(\"AutoBrew\");\n const hasAutoparty = industry.hasResearch(\"AutoPartyManager\");\n let salaryPaid = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\n\n if (hasAutoparty) {\n emp.mor = this.maxMor;\n emp.hap = this.maxHap;\n } else {\n emp.mor *= perfMult;\n emp.hap *= perfMult;\n emp.mor = Math.min(emp.mor, this.maxMor);\n emp.hap = Math.min(emp.hap, this.maxHap);\n }\n\n if (hasAutobrew) {\n emp.ene = this.maxEne;\n } else {\n emp.ene *= perfMult;\n emp.ene = Math.min(emp.ene, this.maxEne);\n }\n\n const salary = emp.process(marketCycles, this);\n salaryPaid += salary;\n }\n\n this.calculateEmployeeProductivity(corporation, industry);\n return salaryPaid;\n }\n\n calculateEmployeeProductivity(corporation, industry) {\n //Reset\n for (const name in this.employeeProd) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\n\n for (let i = 0; i < this.employees.length; ++i) {\n const employee = this.employees[i];\n const prod = employee.calculateProductivity(corporation, industry);\n this.employeeProd[employee.pos] += prod;\n total += prod;\n }\n\n this.employeeProd.total = total;\n }\n\n hireRandomEmployee() {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return; //Generate three random employees (meh, decent, amazing)\n\n const mult = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_2__[/* getRandomInt */ \"a\"])(50, 100),\n sal = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp = new _Employee__WEBPACK_IMPORTED_MODULE_5__[/* Employee */ \"a\"]({\n intelligence: int * mult,\n charisma: cha * mult,\n experience: exp * mult,\n creativity: cre * mult,\n efficiency: eff * mult,\n salary: sal * mult\n });\n const name = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* generateRandomString */ \"d\"])(7);\n\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].name === name) {\n return this.hireRandomEmployee();\n }\n }\n\n emp.name = name;\n this.employees.push(emp);\n return emp;\n } //Finds the first unassigned employee and assigns its to the specified job\n\n\n assignEmployeeToJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n\n return false;\n } //Finds the first employee with the given job and unassigns it\n\n\n unassignEmployeeFromJob(job) {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Unassigned;\n return true;\n }\n }\n\n return false;\n }\n\n copy() {\n const office = new OfficeSpace();\n office.loc = this.loc;\n office.size = this.size;\n office.minEne = this.minEne;\n office.maxEne = this.maxEne;\n office.minHap = this.minHap;\n office.maxHap = this.maxHap;\n office.maxMor = this.maxMor;\n office.employeeProd = {\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management],\n [_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD]: this.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD],\n total: this.employeeProd[\"total\"]\n };\n office.employees = [];\n\n for (const employee of this.employees) {\n office.employees.push(employee.copy());\n }\n\n return office;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"OfficeSpace\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(OfficeSpace, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.OfficeSpace = OfficeSpace;\n\n//# sourceURL=webpack:///./src/Corporation/OfficeSpace.ts?"); /***/ }), -/* 290 */ +/* 291 */ /*!*********************************************!*\ !*** ./src/Corporation/IndustryUpgrades.ts ***! \*********************************************/ @@ -2293,7 +2305,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryUpgrades; });\n// Industry upgrades\n// The data structure is an array with the following format:\n// [index in array, base price, price mult, benefit mult (if applicable), name, desc]\nconst IndustryUpgrades = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [1, 1e9, 1.06, 1.03, \"AdVert.Inc\", \"Hire AdVert.Inc to advertise your company. Each level of \" + \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" + \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" + \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" + \"that increase the power of your advertising.\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/IndustryUpgrades.ts?"); /***/ }), -/* 291 */ +/* 292 */ /*!*****************************************!*\ !*** ./src/utils/MoneySourceTracker.ts ***! \*****************************************/ @@ -2305,7 +2317,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoneySourceTracker; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * This is an object that is used to keep track of where all of the player's\n * money is coming from (or going to)\n */\n\nclass MoneySourceTracker {\n constructor() {\n _defineProperty(this, \"bladeburner\", 0);\n\n _defineProperty(this, \"casino\", 0);\n\n _defineProperty(this, \"class\", 0);\n\n _defineProperty(this, \"codingcontract\", 0);\n\n _defineProperty(this, \"corporation\", 0);\n\n _defineProperty(this, \"crime\", 0);\n\n _defineProperty(this, \"gang\", 0);\n\n _defineProperty(this, \"hacking\", 0);\n\n _defineProperty(this, \"hacknetnode\", 0);\n\n _defineProperty(this, \"hospitalization\", 0);\n\n _defineProperty(this, \"infiltration\", 0);\n\n _defineProperty(this, \"sleeves\", 0);\n\n _defineProperty(this, \"stock\", 0);\n\n _defineProperty(this, \"total\", 0);\n\n _defineProperty(this, \"work\", 0);\n }\n\n // Record money earned\n record(amt, source) {\n const sanitizedSource = source.toLowerCase();\n\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n this[sanitizedSource] += amt;\n this.total += amt;\n } // Reset the money tracker by setting all stats to 0\n\n\n reset() {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n this[prop] = 0;\n }\n }\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"MoneySourceTracker\", this);\n } // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(MoneySourceTracker, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.MoneySourceTracker = MoneySourceTracker;\n\n//# sourceURL=webpack:///./src/utils/MoneySourceTracker.ts?"); /***/ }), -/* 292 */ +/* 293 */ /*!*************************************************************!*\ !*** ./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts ***! \*************************************************************/ @@ -2314,14 +2326,14 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return MaxSleevesFromCovenant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseCostPerSleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PopupId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createSleevePurchasesFromCovenantPopup; });\n/* harmony import */ var _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/CovenantPurchasesRoot */ 1035);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\n\nconst MaxSleevesFromCovenant = 5;\nconst BaseCostPerSleeve = 10e12;\nconst PopupId = \"covenant-sleeve-purchases-popup\";\nfunction createSleevePurchasesFromCovenantPopup(p) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(PopupId, _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__[/* CovenantPurchasesRoot */ \"a\"], {\n p: p,\n closeFn: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(PopupId)\n });\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return MaxSleevesFromCovenant; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseCostPerSleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return PopupId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createSleevePurchasesFromCovenantPopup; });\n/* harmony import */ var _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ui/CovenantPurchasesRoot */ 1037);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\n\nconst MaxSleevesFromCovenant = 5;\nconst BaseCostPerSleeve = 10e12;\nconst PopupId = \"covenant-sleeve-purchases-popup\";\nfunction createSleevePurchasesFromCovenantPopup(p) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(PopupId, _ui_CovenantPurchasesRoot__WEBPACK_IMPORTED_MODULE_0__[/* CovenantPurchasesRoot */ \"a\"], {\n p: p,\n closeFn: () => Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(PopupId)\n });\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.ts?"); /***/ }), -/* 293 */, /* 294 */, /* 295 */, /* 296 */, -/* 297 */ +/* 297 */, +/* 298 */ /*!***********************************!*\ !*** ./src/Faction/ui/Option.tsx ***! \***********************************/ @@ -2333,7 +2345,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Option; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React component for a selectable option on the Faction UI. These\n * options including working for the faction, hacking missions, purchasing\n * augmentations, etc.\n */\n\n\nclass Option extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.onClick,\n text: this.props.buttonText\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.infoText)));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Option.tsx?"); /***/ }), -/* 298 */, /* 299 */, /* 300 */, /* 301 */, @@ -2343,7 +2354,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 305 */, /* 306 */, /* 307 */, -/* 308 */ +/* 308 */, +/* 309 */, +/* 310 */ /*!**********************************!*\ !*** ./src/Hospital/Hospital.ts ***! \**********************************/ @@ -2355,7 +2368,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getHospitalizationCost; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateHospitalizationCost; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n\nfunction getHospitalizationCost(p) {\n let money;\n\n if (typeof p.money === \"number\") {\n money = p.money;\n } else {\n money = p.money.toNumber();\n }\n\n if (money < 0) {\n return 0;\n }\n\n return Math.min(money * 0.1, (p.max_hp - p.hp) * _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].HospitalCostPerHp);\n}\nfunction calculateHospitalizationCost(p, damage) {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n\n//# sourceURL=webpack:///./src/Hospital/Hospital.ts?"); /***/ }), -/* 309 */ +/* 311 */ /*!*************************************!*\ !*** ./utils/helpers/roundToTwo.ts ***! \*************************************/ @@ -2367,7 +2380,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return roundToTwo; });\n/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nfunction roundToTwo(decimal) {\n const leftShift = Math.round(parseFloat(`${decimal}e+2`));\n return +`${leftShift}e-2`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/roundToTwo.ts?"); /***/ }), -/* 310 */ +/* 312 */ /*!****************************************************!*\ !*** ./src/PersonObjects/formulas/intelligence.ts ***! \****************************************************/ @@ -2379,7 +2392,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateIntelligenceBonus; });\nfunction calculateIntelligenceBonus(intelligence, weight = 1) {\n return 1 + weight * Math.pow(intelligence, 0.8) / 600;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/formulas/intelligence.ts?"); /***/ }), -/* 311 */ +/* 313 */ /*!****************************!*\ !*** ./src/Fconf/Fconf.js ***! \****************************/ @@ -2391,7 +2404,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createFconf; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return parseFconfSettings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return loadFconf; });\n/* harmony import */ var _FconfSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./FconfSettings */ 67);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\n\nvar FconfComments = {\n ENABLE_BASH_HOTKEYS: \"Improved Bash emulation mode. Setting this to 1 enables several\\n\" + \"new Terminal shortcuts and features that more closely resemble\\n\" + \"a real Bash-style shell. Note that when this mode is enabled,\\n\" + \"the default browser shortcuts are overriden by the new Bash\\n\" + \"shortcuts.\\n\\n\" + \"To see a full list of the Terminal shortcuts that this enables, see:\\n\" + \"http://bitburner.readthedocs.io/en/latest/shortcuts.html\",\n ENABLE_TIMESTAMPS: \"Terminal commands and log entries will be timestamped. The timestamp\\n\" + \"will have the format: M/D h:m\",\n MAIN_MENU_STYLE: \"Customize the main navigation menu on the left-hand side. Current options:\\n\\n\" + \"default, classic, compact\",\n THEME_BACKGROUND_COLOR: \"Sets the background color for not only the Terminal, but also for\\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #000000\",\n THEME_FONT_COLOR: \"Sets the font color for not only the Terminal, but also for\\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #66ff33\",\n THEME_HIGHLIGHT_COLOR: \"Sets the highlight color for not only the Terminal, but also for \\n\" + \"most of the game's UI.\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #ffffff\",\n THEME_PROMPT_COLOR: \"Sets the prompt color in the Terminal\\n\\n\" + \"The color must be specified as a pound sign (#) followed by a \\n\" + \"3-digit or 6-digit hex color code (e.g. #123456). Default color: #f92672\",\n WRAP_INPUT: \"Wrap Terminal Input. If this is enabled, then when a Terminal command is\\n\" + \"too long and overflows, then it will wrap to the next line instead of\\n\" + \"side-scrolling\\n\\n\" + \"Note that after you enable/disable this, you'll have to run a command\\n\" + \"before its effect takes place.\"\n};\nconst MainMenuStyleOptions = [\"default\", \"classic\", \"compact\"]; //Parse Fconf settings from the config text\n//Throws an exception if parsing fails\n\nfunction parseFconfSettings(config) {\n var ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(config, {\n sourceType: \"module\"\n });\n var queue = [];\n queue.push(ast);\n\n while (queue.length != 0) {\n var exp = queue.shift();\n\n switch (exp.type) {\n case \"BlockStatement\":\n case \"Program\":\n for (var i = 0; i < exp.body.length; ++i) {\n if (exp.body[i] instanceof acorn__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]) {\n queue.push(exp.body[i]);\n }\n }\n\n break;\n\n case \"AssignmentExpression\":\n var setting, value;\n\n if (exp.left != null && exp.left.name != null) {\n setting = exp.left.name;\n } else {\n break;\n }\n\n if (exp.right != null && exp.right.raw != null) {\n value = exp.right.raw;\n } else {\n break;\n }\n\n parseFconfSetting(setting, value);\n break;\n\n default:\n break;\n }\n\n for (var prop in exp) {\n if (exp.hasOwnProperty(prop)) {\n if (exp[prop] instanceof acorn__WEBPACK_IMPORTED_MODULE_1__[/* Node */ \"a\"]) {\n queue.push(exp[prop]);\n }\n }\n }\n }\n\n setTheme();\n setMainMenuStyle();\n}\n\nfunction parseFconfSetting(setting, value) {\n setting = String(setting);\n value = String(value);\n\n if (setting == null || value == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] == null) {\n console.warn(`Invalid .fconf setting: ${setting}`);\n return;\n }\n\n function sanitizeString(value) {\n value = value.toLowerCase();\n\n if (value.startsWith('\"')) {\n value = value.slice(1);\n }\n\n if (value.endsWith('\"')) {\n value = value.slice(0, -1);\n }\n\n return value;\n }\n\n switch (setting) {\n case \"ENABLE_BASH_HOTKEYS\":\n case \"ENABLE_TIMESTAMPS\":\n case \"WRAP_INPUT\":\n // Need to convert entered value to boolean/strings accordingly\n var value = value.toLowerCase();\n\n if (value === \"1\" || value === \"true\" || value === \"y\") {\n value = true;\n } else {\n value = false;\n }\n\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n break;\n\n case \"MAIN_MENU_STYLE\":\n var value = sanitizeString(value);\n\n if (MainMenuStyleOptions.includes(value)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Invalid option specified for ${setting}. Options: ${MainMenuStyleOptions.toString()}`);\n }\n\n break;\n\n case \"THEME_BACKGROUND_COLOR\":\n case \"THEME_FONT_COLOR\":\n case \"THEME_HIGHLIGHT_COLOR\":\n case \"THEME_PROMPT_COLOR\":\n var value = sanitizeString(value);\n\n if (/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(value)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = value;\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`Invalid color specified for ${setting}. Must be a hex color code preceded by a pound (#)`);\n }\n\n break;\n\n default:\n break;\n }\n} //Create the .fconf file text from the settings\n\n\nfunction createFconf() {\n var res = \"\";\n\n for (var setting in _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"]) {\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].hasOwnProperty(setting)) {\n //Setting comments (description)\n var comment = FconfComments[setting];\n\n if (comment == null) {\n continue;\n }\n\n var comment = comment.split(\"\\n\");\n\n for (var i = 0; i < comment.length; ++i) {\n res += \"//\" + comment[i] + \"\\n\";\n }\n\n var value = 0;\n\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] === true) {\n value = \"1\";\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] === false) {\n value = \"0\";\n } else {\n value = '\"' + String(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting]) + '\"';\n }\n\n res += `${setting} = ${value}\\n\\n`;\n }\n }\n\n return res;\n}\n\nfunction loadFconf(saveString) {\n let tempFconfSettings = JSON.parse(saveString);\n\n for (var setting in tempFconfSettings) {\n if (tempFconfSettings.hasOwnProperty(setting)) {\n _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][setting] = tempFconfSettings[setting];\n }\n } // Initialize themes/styles after loading\n\n\n setTheme();\n setMainMenuStyle();\n}\n\nfunction setTheme() {\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR == null || _FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_PROMPT_COLOR == null) {\n console.error(\"Cannot find Theme Settings\");\n return;\n }\n\n if (/^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_HIGHLIGHT_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_FONT_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_BACKGROUND_COLOR) && /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i.test(_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"].THEME_PROMPT_COLOR)) {// document.body.style.setProperty(\"--my-highlight-color\", FconfSettings.THEME_HIGHLIGHT_COLOR);\n // document.body.style.setProperty(\"--my-font-color\", FconfSettings.THEME_FONT_COLOR);\n // document.body.style.setProperty(\"--my-background-color\", FconfSettings.THEME_BACKGROUND_COLOR);\n // document.body.style.setProperty(\"--my-prompt-color\", FconfSettings.THEME_PROMPT_COLOR);\n }\n}\n\nfunction setMainMenuStyle() {\n const mainMenu = document.getElementById(\"mainmenu\");\n const hackingMenuHdr = document.getElementById(\"hacking-menu-header\");\n const characterMenuHdr = document.getElementById(\"character-menu-header\");\n const worldMenuHdr = document.getElementById(\"world-menu-header\");\n const helpMenuHdr = document.getElementById(\"help-menu-header\");\n\n function removeAllAccordionHeaderClasses() {\n hackingMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n characterMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n worldMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n helpMenuHdr.classList.remove(\"mainmenu-accordion-header\", \"mainmenu-accordion-header-classic\");\n }\n\n function addClassToAllAccordionHeaders(clsName) {\n hackingMenuHdr.classList.add(clsName);\n characterMenuHdr.classList.add(clsName);\n worldMenuHdr.classList.add(clsName);\n helpMenuHdr.classList.add(clsName);\n }\n\n if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"default\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"classic\");\n mainMenu.classList.remove(\"compact\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header\");\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"classic\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"compact\");\n mainMenu.classList.add(\"classic\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header-classic\");\n } else if (_FconfSettings__WEBPACK_IMPORTED_MODULE_0__[/* FconfSettings */ \"a\"][\"MAIN_MENU_STYLE\"] === \"compact\") {\n removeAllAccordionHeaderClasses();\n mainMenu.classList.remove(\"classic\");\n mainMenu.classList.add(\"compact\");\n addClassToAllAccordionHeaders(\"mainmenu-accordion-header-compact\");\n } else {\n return;\n } // Click each header twice to reset lol\n\n\n hackingMenuHdr.click();\n hackingMenuHdr.click();\n characterMenuHdr.click();\n characterMenuHdr.click();\n worldMenuHdr.click();\n worldMenuHdr.click();\n helpMenuHdr.click();\n helpMenuHdr.click();\n}\n\n\n\n//# sourceURL=webpack:///./src/Fconf/Fconf.js?"); /***/ }), -/* 312 */ +/* 314 */ /*!************************************!*\ !*** ./src/Corporation/Product.ts ***! \************************************/ @@ -2400,17 +2413,17 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Product; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ProductRatingWeights */ 700);\n/* harmony import */ var _Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations/createCityMap */ 405);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass Product {\n // Product name\n // The demand for this Product in the market. Gradually decreases\n // How much competition there is in the market for this Product\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n // Production cost - estimation of how much money it costs to make this Product\n // Sell cost\n // Variables for handling the creation process of this Product\n // Whether this Product has finished being created\n // Creation progress - A number betwee 0-100 representing percentage\n // City in which the product is/was being created\n // How much money was invested into designing this Product\n // How much money was invested into advertising this Product\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n // Stats/properties of this Product\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"dmd\", 0);\n\n _defineProperty(this, \"cmp\", 0);\n\n _defineProperty(this, \"mku\", 0);\n\n _defineProperty(this, \"pCost\", 0);\n\n _defineProperty(this, \"sCost\", 0);\n\n _defineProperty(this, \"fin\", false);\n\n _defineProperty(this, \"prog\", 0);\n\n _defineProperty(this, \"createCity\", \"\");\n\n _defineProperty(this, \"designCost\", 0);\n\n _defineProperty(this, \"advCost\", 0);\n\n _defineProperty(this, \"rat\", 0);\n\n _defineProperty(this, \"qlt\", 0);\n\n _defineProperty(this, \"per\", 0);\n\n _defineProperty(this, \"dur\", 0);\n\n _defineProperty(this, \"rel\", 0);\n\n _defineProperty(this, \"aes\", 0);\n\n _defineProperty(this, \"fea\", 0);\n\n _defineProperty(this, \"data\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([0, 0, 0]));\n\n _defineProperty(this, \"loc\", \"\");\n\n _defineProperty(this, \"siz\", 0);\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prdman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"sllman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"marketTa1\", false);\n\n _defineProperty(this, \"marketTa2\", false);\n\n _defineProperty(this, \"marketTa2Price\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])(0));\n\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n } // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n\n\n createProduct(marketCycles = 1, empWorkMult = 1) {\n if (this.fin) {\n return;\n }\n\n this.prog += marketCycles * 0.01 * empWorkMult;\n } // @param industry - Industry object. Reference to industry that makes this Product\n\n\n finishProduct(employeeProd, industry) {\n this.fin = true; //Calculate properties\n\n const progrMult = this.prog / 100;\n const engrRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business] / employeeProd[\"total\"];\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = progrMult * balanceMult * designMult * sciMult;\n this.qlt = totalMult * (0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.per = totalMult * (0.15 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.dur = totalMult * (0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.rel = totalMult * (0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.aes = totalMult * (0.0 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.fea = totalMult * (0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * (busRatio + mgmtRatio)); // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n\n if (this.mku === 0) this.mku = 1;\n this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, 70); //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n\n for (const matName in industry.reqMats) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n } //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n\n\n this.siz = 0;\n\n for (const matName in industry.reqMats) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName] * reqMat;\n }\n }\n\n calculateRating(industry) {\n const weights = _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__[/* ProductRatingWeights */ \"a\"][industry.type];\n\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Product\", this);\n } // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Product, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Product = Product;\n\n//# sourceURL=webpack:///./src/Corporation/Product.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Product; });\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ProductRatingWeights */ 700);\n/* harmony import */ var _Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations/createCityMap */ 406);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nclass Product {\n // Product name\n // The demand for this Product in the market. Gradually decreases\n // How much competition there is in the market for this Product\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n // Production cost - estimation of how much money it costs to make this Product\n // Sell cost\n // Variables for handling the creation process of this Product\n // Whether this Product has finished being created\n // Creation progress - A number betwee 0-100 representing percentage\n // City in which the product is/was being created\n // How much money was invested into designing this Product\n // How much money was invested into advertising this Product\n // Aggregate score for this Product's 'rating'\n // This is based on the stats/properties below. The weighting of the\n // stats/properties below differs between different industries\n // Stats/properties of this Product\n // Data refers to the production, sale, and quantity of the products\n // These values are specific to a city\n // For each city, the data is [qty, prod, sell]\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n // Material requirements. An object that maps the name of a material to how much it requires\n // to make 1 unit of the product.\n // Data to keep track of whether production/sale of this Product is\n // manually limited. These values are specific to a city\n // [Whether production/sale is limited, limit amount]\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"dmd\", 0);\n\n _defineProperty(this, \"cmp\", 0);\n\n _defineProperty(this, \"mku\", 0);\n\n _defineProperty(this, \"pCost\", 0);\n\n _defineProperty(this, \"sCost\", 0);\n\n _defineProperty(this, \"fin\", false);\n\n _defineProperty(this, \"prog\", 0);\n\n _defineProperty(this, \"createCity\", \"\");\n\n _defineProperty(this, \"designCost\", 0);\n\n _defineProperty(this, \"advCost\", 0);\n\n _defineProperty(this, \"rat\", 0);\n\n _defineProperty(this, \"qlt\", 0);\n\n _defineProperty(this, \"per\", 0);\n\n _defineProperty(this, \"dur\", 0);\n\n _defineProperty(this, \"rel\", 0);\n\n _defineProperty(this, \"aes\", 0);\n\n _defineProperty(this, \"fea\", 0);\n\n _defineProperty(this, \"data\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([0, 0, 0]));\n\n _defineProperty(this, \"loc\", \"\");\n\n _defineProperty(this, \"siz\", 0);\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prdman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"sllman\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])([false, 0]));\n\n _defineProperty(this, \"marketTa1\", false);\n\n _defineProperty(this, \"marketTa2\", false);\n\n _defineProperty(this, \"marketTa2Price\", Object(_Locations_createCityMap__WEBPACK_IMPORTED_MODULE_3__[/* createCityMap */ \"a\"])(0));\n\n this.name = params.name ? params.name : \"\";\n this.dmd = params.demand ? params.demand : 0;\n this.cmp = params.competition ? params.competition : 0;\n this.mku = params.markup ? params.markup : 0;\n this.createCity = params.createCity ? params.createCity : \"\";\n this.designCost = params.designCost ? params.designCost : 0;\n this.advCost = params.advCost ? params.advCost : 0;\n this.qlt = params.quality ? params.quality : 0;\n this.per = params.performance ? params.performance : 0;\n this.dur = params.durability ? params.durability : 0;\n this.rel = params.reliability ? params.reliability : 0;\n this.aes = params.aesthetics ? params.aesthetics : 0;\n this.fea = params.features ? params.features : 0;\n this.loc = params.loc ? params.loc : \"\";\n this.siz = params.size ? params.size : 0;\n this.reqMats = params.req ? params.req : {};\n } // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n\n\n createProduct(marketCycles = 1, empWorkMult = 1) {\n if (this.fin) {\n return;\n }\n\n this.prog += marketCycles * 0.01 * empWorkMult;\n } // @param industry - Industry object. Reference to industry that makes this Product\n\n\n finishProduct(employeeProd, industry) {\n this.fin = true; //Calculate properties\n\n const progrMult = this.prog / 100;\n const engrRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business] / employeeProd[\"total\"];\n const designMult = 1 + Math.pow(this.designCost, 0.1) / 100;\n const balanceMult = 1.2 * engrRatio + 0.9 * mgmtRatio + 1.3 * rndRatio + 1.5 * opsRatio + busRatio;\n const sciMult = 1 + Math.pow(industry.sciResearch.qty, industry.sciFac) / 800;\n const totalMult = progrMult * balanceMult * designMult * sciMult;\n this.qlt = totalMult * (0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.per = totalMult * (0.15 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.dur = totalMult * (0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.rel = totalMult * (0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.aes = totalMult * (0.0 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.1 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.fea = totalMult * (0.08 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Engineer] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Management] + 0.02 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].RandD] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Operations] + 0.05 * employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_0__[/* EmployeePositions */ \"a\"].Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * (busRatio + mgmtRatio)); // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n\n if (this.mku === 0) this.mku = 1;\n this.dmd = industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, 70); //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n\n for (const matName in industry.reqMats) {\n if (industry.reqMats.hasOwnProperty(matName)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.reqMats[matName] = reqMat;\n }\n } //Calculate the product's size\n //For now, just set it to be the same size as the requirements to make materials\n\n\n this.siz = 0;\n\n for (const matName in industry.reqMats) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += _MaterialSizes__WEBPACK_IMPORTED_MODULE_1__[/* MaterialSizes */ \"a\"][matName] * reqMat;\n }\n }\n\n calculateRating(industry) {\n const weights = _ProductRatingWeights__WEBPACK_IMPORTED_MODULE_2__[/* ProductRatingWeights */ \"a\"][industry.type];\n\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\n }\n\n this.rat = 0;\n this.rat += weights.Quality ? this.qlt * weights.Quality : 0;\n this.rat += weights.Performance ? this.per * weights.Performance : 0;\n this.rat += weights.Durability ? this.dur * weights.Durability : 0;\n this.rat += weights.Reliability ? this.rel * weights.Reliability : 0;\n this.rat += weights.Aesthetics ? this.aes * weights.Aesthetics : 0;\n this.rat += weights.Features ? this.fea * weights.Features : 0;\n } // Serialize the current object to a JSON save state.\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"Product\", this);\n } // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(Product, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.Product = Product;\n\n//# sourceURL=webpack:///./src/Corporation/Product.ts?"); /***/ }), -/* 313 */, -/* 314 */, /* 315 */, /* 316 */, /* 317 */, /* 318 */, /* 319 */, -/* 320 */ +/* 320 */, +/* 321 */, +/* 322 */ /*!*********************************!*\ !*** ./src/Bladeburner/City.ts ***! \*********************************/ @@ -2422,7 +2435,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return City; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 44);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/helpers/addOffset */ 187);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\nclass City {\n /**\n * Name of the city.\n */\n\n /**\n * Population of the city.\n */\n\n /**\n * Population estimation of the city.\n */\n\n /**\n * Number of communities in the city.\n */\n\n /**\n * Estimated number of communities in the city.\n */\n\n /**\n * Chaos level of the city.\n */\n constructor(name = _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].CityNames[2]) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"pop\", 0);\n\n _defineProperty(this, \"popEst\", 0);\n\n _defineProperty(this, \"comms\", 0);\n\n _defineProperty(this, \"commsEst\", 0);\n\n _defineProperty(this, \"chaos\", 0);\n\n this.name = name; // Synthoid population and estimate\n\n this.pop = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold, 1.5 * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* BladeburnerConstants */ \"a\"].PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5); // Number of Synthoid communities population and estimate\n\n this.comms = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(5, 150);\n this.commsEst = this.comms + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(-5, 5);\n if (this.commsEst < 0) this.commsEst = 0;\n this.chaos = 0;\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n changeChaosByPercentage(p) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n\n if (p === 0) {\n return;\n }\n\n this.chaos += this.chaos * (p / 100);\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n\n if (this.popEst < this.pop) {\n this.popEst += n;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst -= n;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n\n\n improvePopulationEstimateByPercentage(p, skillMult = 1) {\n p = p * skillMult;\n\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n\n this.popEst *= 1 + p / 100;\n\n if (this.popEst > this.pop) {\n this.popEst = this.pop;\n }\n } else if (this.popEst > this.pop) {\n this.popEst *= 1 - p / 100;\n\n if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n improveCommunityEstimate(n = 1) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.improveCommunityEstimate()\");\n }\n\n if (this.commsEst < this.comms) {\n this.commsEst += n;\n\n if (this.commsEst > this.comms) {\n this.commsEst = this.comms;\n }\n } else if (this.commsEst > this.comms) {\n this.commsEst -= n;\n\n if (this.commsEst < this.comms) {\n this.commsEst = this.comms;\n }\n }\n }\n /**\n * @params options:\n * estChange(int): How much the estimate should change by\n * estOffset(int): Add offset to estimate (offset by percentage)\n */\n\n\n changePopulationByCount(n, params = {\n estChange: 0,\n estOffset: 0\n }) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n\n this.pop += n;\n\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n\n if (params.estOffset) {\n this.popEst = Object(_utils_helpers_addOffset__WEBPACK_IMPORTED_MODULE_3__[/* addOffset */ \"a\"])(this.popEst, params.estOffset);\n }\n\n this.popEst = Math.max(this.popEst, 0);\n }\n /**\n * @p is the percentage, not the multiplier. e.g. pass in p = 5 for 5%\n * @params options:\n * changeEstEqually(bool) - Change the population estimate by an equal amount\n * nonZero (bool) - Set to true to ensure that population always changes by at least 1\n */\n\n\n changePopulationByPercentage(p, params = {\n nonZero: false,\n changeEstEqually: false\n }) {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n\n if (p === 0) {\n return 0;\n }\n\n let change = Math.round(this.pop * (p / 100)); // Population always changes by at least 1\n\n if (params.nonZero && change === 0) {\n p > 0 ? change = 1 : change = -1;\n }\n\n this.pop += change;\n\n if (params.changeEstEqually) {\n this.popEst += change;\n\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n\n return change;\n }\n\n changeChaosByCount(n) {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n\n if (n === 0) {\n return;\n }\n\n this.chaos += n;\n\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"City\", this);\n }\n /**\n * Initiatizes a City object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(City, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.City = City;\n\n//# sourceURL=webpack:///./src/Bladeburner/City.ts?"); /***/ }), -/* 321 */ +/* 323 */ /*!*******************************!*\ !*** ./src/Locations/City.ts ***! \*******************************/ @@ -2434,8 +2447,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return City; });\n/**\n * Class representing a City in the game\n */\nclass City {\n /**\n * List of all locations in this city\n */\n\n /**\n * Name of this city\n */\n\n /**\n * Metro map ascii art\n */\n constructor(name, locations = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc) {\n this.locations.push(loc);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/City.ts?"); /***/ }), -/* 322 */, -/* 323 */, /* 324 */, /* 325 */, /* 326 */, @@ -2443,7 +2454,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 328 */, /* 329 */, /* 330 */, -/* 331 */ +/* 331 */, +/* 332 */, +/* 333 */ /*!***************************************************!*\ !*** ./src/StockMarket/ui/StockTickersConfig.tsx ***! \***************************************************/ @@ -2455,14 +2468,14 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return TickerDisplayMode; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickersConfig; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React component for the tickers configuration section of the Stock Market UI.\n * This config lets you change the way stock tickers are displayed (watchlist,\n * all/portoflio mode, etc)\n */\n\n\nlet TickerDisplayMode;\n\n(function (TickerDisplayMode) {\n TickerDisplayMode[TickerDisplayMode[\"AllStocks\"] = 0] = \"AllStocks\";\n TickerDisplayMode[TickerDisplayMode[\"Portfolio\"] = 1] = \"Portfolio\";\n})(TickerDisplayMode || (TickerDisplayMode = {}));\n\nclass StockTickersConfig extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n }\n\n renderDisplayModeButton() {\n let txt = \"\";\n let tooltip = \"\";\n\n if (this.props.tickerDisplayMode === TickerDisplayMode.Portfolio) {\n txt = \"Switch to 'All Stocks' Mode\";\n tooltip = \"Displays all stocks on the WSE\";\n } else {\n txt = \"Switch to 'Portfolio' Mode\";\n tooltip = \"Displays only the stocks for which you have shares or orders\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.changeDisplayMode,\n text: txt,\n tooltip: tooltip\n });\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, this.renderDisplayModeButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.expandAllTickers,\n text: \"Expand Tickers\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: this.props.collapseAllTickers,\n text: \"Collapse Tickers\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"text-input\",\n id: \"stock-market-watchlist-filter\",\n onChange: this.props.changeWatchlistFilter,\n placeholder: \"Filter Stocks by symbol (comma-separated list)\",\n type: \"text\"\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickersConfig.tsx?"); /***/ }), -/* 332 */, -/* 333 */, /* 334 */, /* 335 */, /* 336 */, /* 337 */, /* 338 */, -/* 339 */ +/* 339 */, +/* 340 */, +/* 341 */ /*!***********************************************************!*\ !*** ./src/Corporation/data/CorporationUnlockUpgrades.ts ***! \***********************************************************/ @@ -2474,7 +2487,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationUnlockUpgrades; });\n// Corporation Unlock Upgrades\n// Upgrades for entire corporation, unlocks features, either you have it or you dont\n// The data structure is an array with the following format:\n// [index in Corporation feature upgrades array, price, name, description]\nconst CorporationUnlockUpgrades = {\n //Lets you export goods\n \"0\": [0, 20e9, \"Export\", \"Develop infrastructure to export your materials to your other facilities. \" + \"This allows you to move materials around between different divisions and cities.\"],\n //Lets you buy exactly however many required materials you need for production\n \"1\": [1, 25e9, \"Smart Supply\", \"Use advanced AI to anticipate your supply needs. \" + \"This allows you to purchase exactly however many materials you need for production.\"],\n //Displays each material/product's demand\n \"2\": [2, 5e9, \"Market Research - Demand\", \"Mine and analyze market data to determine the demand of all resources. \" + \"The demand attribute, which affects sales, will be displayed for every material and product.\"],\n //Display's each material/product's competition\n \"3\": [3, 5e9, \"Market Data - Competition\", \"Mine and analyze market data to determine how much competition there is on the market \" + \"for all resources. The competition attribute, which affects sales, will be displayed for \" + \"every material and product.\"],\n \"4\": [4, 10e9, \"VeChain\", \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" + \"This upgrade will allow you to view a wide array of useful statistics about your \" + \"Corporation.\"],\n \"5\": [5, 500e9, \"Shady Accounting\", \"Utilize unscrupulous accounting practices and pay off government officials to save money \" + \"on taxes. This reduces the dividend tax rate by 5%.\"],\n \"6\": [6, 2e12, \"Government Partnership\", \"Help national governments further their agendas in exchange for lowered taxes. \" + \"This reduces the dividend tax rate by 10%\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts?"); /***/ }), -/* 340 */ +/* 342 */ /*!*****************************************************!*\ !*** ./src/Corporation/data/CorporationUpgrades.ts ***! \*****************************************************/ @@ -2486,7 +2499,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorporationUpgrades; });\n// Corporation Upgrades\n// Upgrades for entire corporation, levelable upgrades\n// The data structure is an array with the following format\n// [index in Corporation upgrades array, base price, price mult, benefit mult (additive), name, desc]\nconst CorporationUpgrades = {\n //Smart factories, increases production\n \"0\": [0, 2e9, 1.06, 0.03, \"Smart Factories\", \"Advanced AI automatically optimizes the operation and productivity \" + \"of factories. Each level of this upgrade increases your global production by 3% (additive).\"],\n //Smart warehouses, increases storage size\n \"1\": [1, 2e9, 1.06, 0.1, \"Smart Storage\", \"Advanced AI automatically optimizes your warehouse storage methods. \" + \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\"],\n //Advertise through dreams, passive popularity/ awareness gain\n \"2\": [2, 4e9, 1.1, 0.001, \"DreamSense\", \"Use DreamSense LCC Technologies to advertise your corporation \" + \"to consumers through their dreams. Each level of this upgrade provides a passive \" + \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" + \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" + \"15 seconds.\"],\n //Makes advertising more effective\n \"3\": [3, 4e9, 1.12, 0.005, \"Wilson Analytics\", \"Purchase data and analysis from Wilson, a marketing research \" + \"firm. Each level of this upgrades increases the effectiveness of your \" + \"advertising by 0.5% (additive).\"],\n //Augmentation for employees, increases cre\n \"4\": [4, 1e9, 1.06, 0.1, \"Nuoptimal Nootropic Injector Implants\", \"Purchase the Nuoptimal Nootropic \" + \"Injector augmentation for your employees. Each level of this upgrade \" + \"globally increases the creativity of your employees by 10% (additive).\"],\n //Augmentation for employees, increases cha\n \"5\": [5, 1e9, 1.06, 0.1, \"Speech Processor Implants\", \"Purchase the Speech Processor augmentation for your employees. \" + \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\"],\n //Augmentation for employees, increases int\n \"6\": [6, 1e9, 1.06, 0.1, \"Neural Accelerators\", \"Purchase the Neural Accelerator augmentation for your employees. \" + \"Each level of this upgrade globally increases the intelligence of your employees \" + \"by 10% (additive).\"],\n //Augmentation for employees, increases eff\n \"7\": [7, 1e9, 1.06, 0.1, \"FocusWires\", \"Purchase the FocusWire augmentation for your employees. Each level \" + \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\"],\n //Improves sales of materials/products\n \"8\": [8, 1e9, 1.07, 0.01, \"ABC SalesBots\", \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" + \"materials and products you sell. Each level of this upgrade globally increases your sales \" + \"by 1% (additive).\"],\n //Improves scientific research rate\n \"9\": [9, 5e9, 1.07, 0.05, \"Project Insight\", \"Purchase 'Project Insight', a R&D service provided by the secretive \" + \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" + \"Scientific Research you produce by 5% (additive).\"]\n};\n\n//# sourceURL=webpack:///./src/Corporation/data/CorporationUpgrades.ts?"); /***/ }), -/* 341 */ +/* 343 */ /*!******************************************!*\ !*** ./utils/uiHelpers/removeElement.ts ***! \******************************************/ @@ -2498,7 +2511,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeElement; });\n/**\n * For a given element, this function removes it AND its children\n * @param elem The element to remove.\n */\nfunction removeElement(elem) {\n if (elem === null) {\n // tslint:disable-next-line:no-console\n console.debug(\"The element passed into 'removeElement' was null.\");\n return;\n }\n\n if (!(elem instanceof Element)) {\n // tslint:disable-next-line:no-console\n console.debug(\"The element passed into 'removeElement' was not an instance of an Element.\");\n return;\n }\n\n while (elem.firstChild !== null) {\n elem.removeChild(elem.firstChild);\n }\n\n if (elem.parentNode !== null) {\n elem.parentNode.removeChild(elem);\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeElement.ts?"); /***/ }), -/* 342 */ +/* 344 */ /*!***********************************!*\ !*** ./src/utils/EventEmitter.ts ***! \***********************************/ @@ -2510,12 +2523,12 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return EventEmitter; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nclass EventEmitter {\n /**\n * Map of Subscriber name -> Callback function\n */\n constructor(subs) {\n _defineProperty(this, \"subscribers\", {});\n\n if (Array.isArray(subs)) {\n for (const s of subs) {\n this.addSubscriber(s);\n }\n }\n }\n\n addSubscriber(s) {\n this.subscribers[s.id] = s.cb;\n }\n\n emitEvent(...args) {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n sub(args);\n }\n }\n\n removeSubscriber(id) {\n delete this.subscribers[id];\n }\n\n}\n\n//# sourceURL=webpack:///./src/utils/EventEmitter.ts?"); /***/ }), -/* 343 */, -/* 344 */, /* 345 */, /* 346 */, /* 347 */, -/* 348 */ +/* 348 */, +/* 349 */, +/* 350 */ /*!***********************************!*\ !*** ./src/ui/React/WorldMap.tsx ***! \***********************************/ @@ -2527,7 +2540,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorldMap; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n\n\n\nfunction City(props) {\n if (props.city !== props.currentCity) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\"\n },\n onClick: () => props.onTravel(props.city)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, props.city[0]));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, props.city[0]);\n}\n\nfunction WorldMap(props) {\n // prettier-ignore\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ,_ . ._. _. .\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" , _-\\\\','|~\\\\~ ~/ ;-'_ _-' ,;_;_, ~~-\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" /~~-\\\\_/-'~'--' \\\\~~| ', ,' / / ~|-_\\\\_/~/~ ~~--~~~~'--_\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / ,/'-/~ '\\\\ ,' _ , '\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven\n }), \",'|~ ._/-, /~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~/-'~\\\\_, '-,| '|. ' ~ ,\\\\ /'~ / /_ /~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \".-~ '| '',\\\\~|\\\\ _\\\\~ ,_ , \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing\n }), \" /,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" '\\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12\n }), \" /'~ |_/~\\\\\\\\,-,~ \\\\ \\\" ,_,/ |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | / ._-~'\\\\_ _~| \\\\ ) \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ __-\\\\ '/ ~ |\\\\ \\\\_ / ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ., '\\\\ |, ~-_ - | \\\\\\\\_' ~| /\\\\ \\\\~ ,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~-_' _; '\\\\ '-, \\\\,' /\\\\/ |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" '\\\\_,~'\\\\_ \\\\_ _, /' ' |, /|'\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / \\\\_ ~ | / \\\\ ~'; -,_.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ~\\\\ | | , '-_, ,; ~ ~\\\\\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\, \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum\n }), \" / \\\\ / /| ,-, , -,\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ,/ | |' |/ ,- ~ \\\\ '.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ,| ,/ \\\\ ,/ \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(City, {\n onTravel: props.onTravel,\n currentCity: props.currentCity,\n city: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima\n }), \" |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / | ~ -~~-, / _\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | ,-' ~ /\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" / ,' ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ',| ~\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" ~'\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/WorldMap.tsx?"); /***/ }), -/* 349 */ +/* 351 */ /*!**********************************************!*\ !*** ./src/Bladeburner/ui/SuccessChance.tsx ***! \**********************************************/ @@ -2539,9 +2552,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SuccessChance; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\nfunction SuccessChance(props) {\n if (props.chance[0] === props.chance[1]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[0] * 100, 1), \"%\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[0] * 100, 1), \"% ~ \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.chance[1] * 100, 1), \"%\");\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SuccessChance.tsx?"); /***/ }), -/* 350 */, -/* 351 */, -/* 352 */ +/* 352 */, +/* 353 */, +/* 354 */ /*!***********************************!*\ !*** ./src/Crime/CrimeHelpers.ts ***! \***********************************/ @@ -2553,7 +2566,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineCrimeSuccess; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return findCrime; });\n/* harmony import */ var _Crimes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Crimes */ 60);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nfunction determineCrimeSuccess(p, type) {\n let chance = 0;\n let found = false;\n\n for (const i in _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"]) {\n const crime = _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"][i];\n\n if (crime.type == type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`, false);\n return false;\n }\n\n if (Math.random() <= chance) {\n //Success\n return true;\n } else {\n //Failure\n return false;\n }\n}\nfunction findCrime(roughName) {\n if (roughName.includes(\"shoplift\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].RobStore;\n } else if (roughName.includes(\"mug\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Mug;\n } else if (roughName.includes(\"larceny\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].BondForgery;\n } else if (roughName.includes(\"traffick\") && roughName.includes(\"arms\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Kidnap;\n } else if (roughName.includes(\"assassinate\") || roughName.includes(\"assassination\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Assassination;\n } else if (roughName.includes(\"heist\")) {\n return _Crimes__WEBPACK_IMPORTED_MODULE_0__[/* Crimes */ \"a\"].Heist;\n }\n\n return null;\n}\n\n//# sourceURL=webpack:///./src/Crime/CrimeHelpers.ts?"); /***/ }), -/* 353 */ +/* 355 */ /*!*************************************!*\ !*** ./src/Corporation/Employee.ts ***! \*************************************/ @@ -2565,11 +2578,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Employee; });\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\nclass Employee {\n constructor(params = {}) {\n _defineProperty(this, \"pro\", 0);\n\n _defineProperty(this, \"cyclesUntilRaise\", _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].CyclesPerEmployeeRaise);\n\n this.name = params.name ? params.name : \"Bobby\"; //Morale, happiness, and energy are 0-100\n\n this.mor = params.morale ? params.morale : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.hap = params.happiness ? params.happiness : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.ene = params.energy ? params.energy : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(50, 100);\n this.int = params.intelligence ? params.intelligence : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.cha = params.charisma ? params.charisma : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.exp = params.experience ? params.experience : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.cre = params.creativity ? params.creativity : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.eff = params.efficiency ? params.efficiency : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(10, 50);\n this.sal = params.salary ? params.salary : Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_1__[/* getRandomInt */ \"a\"])(0.1, 5);\n this.loc = params.loc ? params.loc : \"\";\n this.pos = _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Unassigned;\n } //Returns the amount the employee needs to be paid\n\n\n process(marketCycles = 1, office) {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain; // Employee salaries slowly go up over time\n\n this.cyclesUntilRaise -= marketCycles;\n\n if (this.cyclesUntilRaise <= 0) {\n this.sal += _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].EmployeeRaiseAmount;\n this.cyclesUntilRaise += _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].CyclesPerEmployeeRaise;\n } //Training\n\n\n const trainingEff = gain * Math.random();\n\n if (this.pos === _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Training) {\n //To increase creativity and intelligence special upgrades are needed\n this.cha += trainingEff;\n this.exp += trainingEff;\n this.eff += trainingEff;\n }\n\n this.ene -= det;\n this.hap -= det;\n\n if (this.ene < office.minEne) {\n this.ene = office.minEne;\n }\n\n if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n\n const salary = this.sal * marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation, industry) {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n const prodBase = this.mor * this.hap * this.ene * 1e-6;\n let prodMult = 0;\n\n switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Unassigned:\n case _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].Training:\n prodMult = 0;\n break;\n\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n\n return prodBase * prodMult;\n } //Process benefits from having an office party thrown\n\n\n throwParty(money) {\n const mult = 1 + money / 10e6;\n this.mor *= mult;\n this.mor = Math.min(100, this.mor);\n this.hap *= mult;\n this.hap = Math.min(100, this.hap);\n return mult;\n } //'panel' is the DOM element on which to create the UI\n\n\n createUI(panel, corporation, industry) {\n const effCre = this.cre * corporation.getEmployeeCreMultiplier() * industry.getEmployeeCreMultiplier(),\n effCha = this.cha * corporation.getEmployeeChaMultiplier() * industry.getEmployeeChaMultiplier(),\n effInt = this.int * corporation.getEmployeeIntMultiplier() * industry.getEmployeeIntMultiplier(),\n effEff = this.eff * corporation.getEmployeeEffMultiplier() * industry.getEmployeeEffMultiplier();\n panel.style.color = \"white\";\n panel.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"p\", {\n id: \"cmpy-mgmt-employee-\" + this.name + \"-panel-text\",\n innerHTML: \"Morale: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.mor, 3) + \"
\" + \"Happiness: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.hap, 3) + \"
\" + \"Energy: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.ene, 3) + \"
\" + \"Intelligence: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effInt, 3) + \"
\" + \"Charisma: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effCha, 3) + \"
\" + \"Experience: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(this.exp, 3) + \"
\" + \"Creativity: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effCre, 3) + \"
\" + \"Efficiency: \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_6__[/* formatNumber */ \"c\"])(effEff, 3) + \"
\" + \"Salary: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_5__[/* numeralWrapper */ \"a\"].format(this.sal, \"$0.000a\") + \"/ s
\"\n })); //Selector for employee position\n\n const selector = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"select\", {});\n\n for (const key in _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"]) {\n if (_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"].hasOwnProperty(key)) {\n selector.add(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"option\", {\n text: _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"][key],\n value: _EmployeePositions__WEBPACK_IMPORTED_MODULE_4__[/* EmployeePositions */ \"a\"][key]\n }));\n }\n }\n\n selector.addEventListener(\"change\", () => {\n this.pos = selector.options[selector.selectedIndex].value;\n }); //Set initial value of selector\n\n for (let i = 0; i < selector.length; ++i) {\n if (selector.options[i].value === this.pos) {\n selector.selectedIndex = i;\n break;\n }\n }\n\n panel.appendChild(selector);\n }\n\n copy() {\n const employee = new Employee();\n employee.name = this.name;\n employee.mor = this.mor;\n employee.hap = this.hap;\n employee.ene = this.ene;\n employee.int = this.int;\n employee.cha = this.cha;\n employee.exp = this.exp;\n employee.cre = this.cre;\n employee.eff = this.eff;\n employee.sal = this.sal;\n employee.pro = this.pro;\n employee.cyclesUntilRaise = this.cyclesUntilRaise;\n employee.loc = this.loc;\n employee.pos = this.pos;\n return employee;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_toJSON */ \"b\"])(\"Employee\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Generic_fromJSON */ \"a\"])(Employee, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_2__[/* Reviver */ \"c\"].constructors.Employee = Employee;\n\n//# sourceURL=webpack:///./src/Corporation/Employee.ts?"); /***/ }), -/* 354 */, -/* 355 */, /* 356 */, /* 357 */, -/* 358 */ +/* 358 */, +/* 359 */, +/* 360 */ /*!********************************!*\ !*** ./src/ui/React/Favor.tsx ***! \********************************/ @@ -2581,8 +2594,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Favor; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction Favor(favor) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"light-yellow samefont\"\n }, typeof favor === \"number\" ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatFavor(favor) : favor);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Favor.tsx?"); /***/ }), -/* 359 */, -/* 360 */, /* 361 */, /* 362 */, /* 363 */, @@ -2611,7 +2622,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 386 */, /* 387 */, /* 388 */, -/* 389 */ +/* 389 */, +/* 390 */ /*!*********************************!*\ !*** ./src/DarkWeb/DarkWeb.tsx ***! \*********************************/ @@ -2620,10 +2632,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkIfConnectedToDarkweb; });\n/* unused harmony export executeDarkwebTerminalCommand */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return listAllDarkwebItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyDarkwebItem; });\n/* harmony import */ var _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItems */ 229);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 434);\n\n\n\n\n\n //Posts a \"help\" message if connected to DarkWeb\n\nfunction checkIfConnectedToDarkweb() {\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n const darkwebIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(\"Darkweb Server\");\n\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__[/* isValidIPAddress */ \"a\"])(darkwebIp)) {\n return;\n }\n\n if (darkwebIp == _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getCurrentServer().ip) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" + \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" + \"to purchase an item.\");\n }\n }\n} //Handler for dark web commands. The terminal's executeCommand() function will pass\n//dark web-specific commands into this. It will pass in the raw split command array\n//rather than the command string\n\nfunction executeDarkwebTerminalCommand(commandArray) {\n if (commandArray.length == 0) {\n return;\n }\n\n switch (commandArray[0]) {\n case \"buy\":\n {\n if (commandArray.length != 2) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Incorrect number of arguments. Usage: \");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy -l\");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy [item name]\");\n return;\n }\n\n const arg = commandArray[1];\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n\n break;\n }\n\n default:\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Command not found\");\n break;\n }\n}\nfunction listAllDarkwebItems() {\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(`${item.program} - ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(item.price)} - ${item.description}`);\n }\n}\nfunction buyDarkwebItem(itemName) {\n itemName = itemName.toLowerCase(); // find the program that matches, if any\n\n let item = null;\n\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n } // return if invalid\n\n\n if (item === null) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Unrecognized item: \" + itemName);\n return;\n } // return if the player already has it.\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hasProgram(item.program)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You already have the \" + item.program + \" program\");\n return;\n } // return if the player doesn't have enough money\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].money.lt(item.price)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Not enough money to purchase \" + item.program);\n return;\n } // buy and push\n\n\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\");\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWeb.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return checkIfConnectedToDarkweb; });\n/* unused harmony export executeDarkwebTerminalCommand */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return listAllDarkwebItems; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buyDarkwebItem; });\n/* harmony import */ var _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DarkWebItems */ 229);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal */ 88);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/isValidIPAddress */ 435);\n\n\n\n\n\n //Posts a \"help\" message if connected to DarkWeb\n\nfunction checkIfConnectedToDarkweb() {\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n const darkwebIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(\"Darkweb Server\");\n\n if (!Object(_utils_helpers_isValidIPAddress__WEBPACK_IMPORTED_MODULE_5__[/* isValidIPAddress */ \"a\"])(darkwebIp)) {\n return;\n }\n\n if (darkwebIp == _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getCurrentServer().ip) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You are now connected to the dark web. From the dark web you can purchase illegal items. \" + \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name] \" + \"to purchase an item.\");\n }\n }\n} //Handler for dark web commands. The terminal's executeCommand() function will pass\n//dark web-specific commands into this. It will pass in the raw split command array\n//rather than the command string\n\nfunction executeDarkwebTerminalCommand(commandArray) {\n if (commandArray.length == 0) {\n return;\n }\n\n switch (commandArray[0]) {\n case \"buy\":\n {\n if (commandArray.length != 2) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Incorrect number of arguments. Usage: \");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy -l\");\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"buy [item name]\");\n return;\n }\n\n const arg = commandArray[1];\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n\n break;\n }\n\n default:\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].error(\"Command not found\");\n break;\n }\n}\nfunction listAllDarkwebItems() {\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(`${item.program} - ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatMoney(item.price)} - ${item.description}`);\n }\n}\nfunction buyDarkwebItem(itemName) {\n itemName = itemName.toLowerCase(); // find the program that matches, if any\n\n let item = null;\n\n for (const key in _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWebItems__WEBPACK_IMPORTED_MODULE_0__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n } // return if invalid\n\n\n if (item === null) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Unrecognized item: \" + itemName);\n return;\n } // return if the player already has it.\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hasProgram(item.program)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You already have the \" + item.program + \" program\");\n return;\n } // return if the player doesn't have enough money\n\n\n if (_Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].money.lt(item.price)) {\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"Not enough money to purchase \" + item.program);\n return;\n } // buy and push\n\n\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n _Terminal__WEBPACK_IMPORTED_MODULE_2__[/* Terminal */ \"a\"].print(\"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\");\n}\n\n//# sourceURL=webpack:///./src/DarkWeb/DarkWeb.tsx?"); /***/ }), -/* 390 */ +/* 391 */ /*!**********************************!*\ !*** ./src/Terminal/HelpText.ts ***! \**********************************/ @@ -2635,7 +2647,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return TerminalHelpText; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HelpTexts; });\n/* tslint:disable:max-line-length completed-docs variable-name*/\nconst TerminalHelpText = [\"Type 'help name' to learn more about the command \", \"\", 'alias [-g] [name=\"value\"] Create or display Terminal aliases', \"analyze Get information about the current machine \", \"backdoor Install a backdoor on the current machine \", \"buy [-l/program] Purchase a program through the Dark Web\", \"cat [file] Display a .msg, .lit, or .txt file\", \"cd [dir] Change to a new directory\", \"check [script] [args...] Print a script's logs to Terminal\", \"clear Clear all text on the terminal \", \"cls See 'clear' command \", \"connect [ip/hostname] Connects to a remote server\", \"download [script/text file] Downloads scripts or text files to your computer\", \"expr [math expression] Evaluate a mathematical expression\", \"free Check the machine's memory (RAM) usage\", \"hack Hack the current machine\", \"help [command] Display this help text, or the help text for a command\", \"home Connect to home computer\", \"hostname Displays the hostname of the machine\", \"ifconfig Displays the IP address of the machine\", \"kill [script/pid] [args...] Stops the specified script on the current server \", \"killall Stops all running scripts on the current machine\", \"ls [dir] [| grep pattern] Displays all files on the machine\", \"lscpu Displays the number of CPU cores on the machine\", \"mem [script] [-t] [n] Displays the amount of RAM required to run the script\", \"mv [src] [dest] Move/rename a text or script file\", \"nano [file] Text editor - Open up and edit a script or text file\", \"ps Display all scripts that are currently running\", \"rm [file] Delete a file from the server\", \"run [name] [-t] [n] [args...] Execute a program or script\", \"scan Prints all immediately-available network connections\", \"scan-analyze [d] [-a] Prints info for all servers up to d nodes away\", \"scp [file] [server] Copies a file to a destination server\", \"sudov Shows whether you have root access on this computer\", \"tail [script] [args...] Displays dynamic logs for the specified script\", \"theme [preset] | bg txt hlgt Change the color scheme of the UI\", \"top Displays all running scripts and their RAM usage\", \"unalias [alias name] Deletes the specified alias\", \"wget [url] [target file] Retrieves code/text from a web server\"];\nconst HelpTexts = {\n alias: ['alias [-g] [name=\"value\"] ', \" \", \"Create or display aliases. An alias enables a replacement of a word with another string. \", \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \", \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \", \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \", \" \", 'alias nuke=\"run NUKE.exe\"', \" \", \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \", \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \", \"example, if the following alias was set: \", \" \", 'alias worm=\"HTTPWorm.exe\"', \" \", \"and then you tried to run the following terminal command: \", \" \", \"run worm\", \" \", \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \", \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \", \" \", 'alias -g worm=\"HTTPWorm.exe\"', \" \", \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \", \" \", \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \", \"'alias NAME=VALUE' on the Terminal. \", \" \", \"The 'unalias' command can be used to remove aliases.\", \" \"],\n analyze: [\"analze\", \" \", \"Prints details and statistics about the current server. The information that is printed includes basic \", \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \", \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \", \"available on the server, etc.\"],\n backdoor: [\"backdoor\", \" \", \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\", \" \", \"Requires root access to run.\", \" \"],\n buy: [\"buy [-l / program]\", \" \", \"Purchase a program through the Dark Web. Requires a TOR router to use.\", \" \", \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \", \"dark web to the Terminal, as well as their costs.\", \" \", \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\"],\n cat: [\"cat [file]\", \" \", \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\", \" \", \"cat j1.msg\", \" \", \"cat foo.lit\", \" \", \"cat servers.txt\"],\n cd: [\"cd [dir]\", \" \", \"Change to the specified directory. Note that this works even for directories that don't exist. If you \", \"change to a directory that does not exist, it will not be 'created'. Examples:\", \" \", \"cd scripts/hacking\", \" \", \"cd /logs\", \" \", \"cd ../\"],\n check: [\"check [script name] [args...]\", \" \", \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \", \"a space. Remember that a running script is uniquely \", \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \", \" \", \"run foo.script 1 2 foodnstuff\", \" \", \"Then to run the 'check' command on this script you would have to pass the same arguments in: \", \" \", \"check foo.script 1 2 foodnstuff\"],\n clear: [\"clear\", \" \", \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \", \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'cls' command\"],\n cls: [\"cls\", \" \", \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \", \"and down arrow keys is still valid. Also note that this is permanent and there is no way to undo this. Synonymous with 'clear' command\"],\n connect: [\"connect [hostname/ip]\", \" \", \"Connect to a remote server. The hostname or IP address of the remote server must be given as the argument \", \"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To \", \"see which servers can be connected to, use the 'scan' command.\"],\n download: [\"download [script/text file]\", \" \", \"Downloads a script or text file to your computer (like your real life computer).\", \" \", \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\", \" \", \"Download all scripts and text files: download *\", \" \", \"Download all scripts: download *.script\", \" \", \"Download all text files: download *.txt\", \" \"],\n expr: [\"expr [mathematical expression]\", \" \", \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\", \" \", \"+, -, /, *, **, %\", \" \", \"Example:\", \" \", \"expr 25 * 2 ** 10\", \" \", \"Note that letters (non-digits) are not allowed and will be removed from the input.\"],\n free: [\"free\", \" \", \"Display's the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \", \"how much of it is being used.\"],\n hack: [\"hack\", \" \", \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\", \" \"],\n help: [\"help [command]\", \" \", \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \", \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \", \"more detailed information about the Terminal command. Examples: \", \" \", \"help alias\", \" \", \"help scan-analyze\"],\n home: [\"home\" + \"Connect to your home computer. This will work no matter what server you are currently connected to.\"],\n hostname: [\"hostname\", \" \", \"Prints the hostname of the current server\"],\n ifconfig: [\"ipconfig\", \" \", \"Prints the IP address of the current server\"],\n kill: [\"kill [script name] [args...]\", \" \", \"kill [pid]\", \" \", \"Kill the script specified by the script name and arguments OR by its PID.\", \" \", \"If you are killing the script using its filename and arguments, then each \", \"argument must be separated by a space. Remember that a running script is \", \"uniquely identified by both its name and the arguments that are used to start \", \"it. So, if a script was ran with the following arguments:\", \" \", \"run foo.script 1 sigma-cosmetics\", \" \", \"Then to kill this script the same arguments would have to be used:\", \" \", \"kill foo.script 1 sigma-cosmetics\", \" \", \"If you are killing the script using its PID, then the PID argument must be numeric\"],\n killall: [\"killall\", \" \", \"Kills all scripts on the current server. \", \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \", \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \", \"The script will not be stopped/killed until after that time has elapsed.\"],\n ls: [\"ls [dir] [| grep pattern]\", \" \", \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \", \"The files will be displayed in alphabetical order. \", \" \", \"The 'dir' optional parameter can be used to display files/directories in another directory.\", \" \", \"The '| grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\", \" \", \"Examples:\", \" \", \"List all files with the '.script' extension in the current directory:\", \" \", \"ls | grep .script\", \" \", \"List all files with the '.js' extension in the root directory:\", \" \", \"ls / | grep .js\", \" \", \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\", \" \", \"ls scripts | grep purchase\"],\n lscpu: [\"lscpu\", \" \", \"Prints the number of CPU Cores the current server has\"],\n mem: [\"mem [script name] [-t] [num threads]\", \" \", \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \", \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \", \"an argument for the number of threads must be passed in afterwards. Examples:\", \" \", \"mem foo.script\", \" \", \"mem foo.script -t 50\", \" \", \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \", \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\"],\n mv: [\"mv [src] [dest]\", \" \", \"Move the source file to the specified destination. This can also be used to rename files. \", \"This command only works for scripts and text files (.txt). This command CANNOT be used to \", \"convert to different file types\", \" \", \"Note that, unlike the Linux 'mv' command, the destination argument must be the \", \"full filepath. \", \"Examples: \", \" \", \"mv hacking-controller.script scripts/hacking-controller.script\", \" \", \"mv myScript.js myOldScript.js\"],\n nano: [\"nano [file name]\", \" \", \"Opens up the specified file in the Text Editor. Only scripts (.script) or text files (.txt) can be \", \"edited using the Text Editor. If the file does not already exist, then a new, empty one \", \"will be created\"],\n ps: [\"ps\", \" \", \"Prints all scripts that are running on the current server\"],\n rm: [\"rm [file]\", \" \", \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \", \" \", \"WARNING: This is permanent and cannot be undone\"],\n run: [\"run [file name] [-t] [num threads] [args...]\", \" \", \"Execute a program or a script.\", \" \", \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \", \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \", \"then the script will be run with a single thread by default. \", \"If the '-t' flag is used, then it MUST come immediately \", \"after the script name, and the [num threads] argument MUST come immediately afterwards. \", \" \", \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \", \"about script arguments. Each specified argument must be separated by a space. \", \" \"],\n scan: [\"scan\", \" \", \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \", \"to using the 'connect' Terminal command.\"],\n \"scan-analyze\": [\"scan-analyze [depth] [-a]\", \" \", \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \", \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \", \"command. This command also shows the relative paths to reach each server.\", \" \", \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \", \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \", \"5 and 10, respectively.\", \" \", \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \", \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \", \"it has.\", \" \", \"By default, this command will not display servers that you have purchased. However, you can pass in the \", \"-a flag at the end of the command if you would like to enable that.\"],\n scp: [\"scp [filename] [target server]\", \" \", \"Copies the specified file from the current server to the target server. \", \"This command only works for script files (.script extension), literature files (.lit extension), \", \"and text files (.txt extension). \", \"The second argument passed in must be the hostname or IP of the target server.\"],\n sudov: [\"sudov\", \" \", \"Prints whether or not you have root access to the current machine\"],\n tail: [\"tail [script name] [args...]\", \" \", \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \", \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \", \"to run it. So, if a script was ran with the following arguments: \", \" \", \"run foo.script 10 50000\", \" \", \"Then in order to check its logs with 'tail' the same arguments must be used: \", \" \", \"tail foo.script 10 50000\"],\n theme: [\"theme [preset] | [#background #text #highlight]\", \" \", \"Change the color of the game's user interface\", \" \", \"This command can be called with a preset theme. Currently, the supported presets are 'default', 'muted', and 'solarized'. \", \"However, you can also specify your own color scheme using hex values. To do so, you must specify three hex color values \", \"for the background color, the text color, and the highlight color. These hex values must be preceded by a pound sign (#) and \", \"must be either 3 or 6 digits. Example:\", \" \", \"theme #ffffff #385 #235012\", \" \", \"A color picker such as \", \"Google's \", \"can be used to get your desired hex color values\", \" \", \"Themes are not saved, so when the game is closed and then re-opened or reloaded then it will revert back to the default theme.\"],\n top: [\"top\", \" \", \"Prints a list of all scripts running on the current server as well as their thread count and how much \", \"RAM they are using in total.\"],\n unalias: [\"unalias [alias name]\", \" \", \"Deletes the specified alias. Note that the double quotation marks are required. \", \" \", \"As an example, if an alias was declared using:\", \" \", 'alias r=\"run\"', \" \", \"Then it could be removed using:\", \" \", \"unalias r\", \" \", \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\"],\n wget: [\"wget [url] [target file]\", \" \", \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \", \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \", \"it will be overwritten by this command.\", \" \", \"Note that it will not be possible to download data from many websites because they do not allow \", \"cross-origin resource sharing (CORS). Example:\", \" \", \"wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\"]\n};\n\n//# sourceURL=webpack:///./src/Terminal/HelpText.ts?"); /***/ }), -/* 391 */ +/* 392 */ /*!******************************!*\ !*** ./src/Netscript/Pid.ts ***! \******************************/ @@ -2647,7 +2659,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateNextPid; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return resetPidCounter; });\n/* harmony import */ var _WorkerScripts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./WorkerScripts */ 153);\n\nlet pidCounter = 1;\n/**\n * Find and return the next availble PID for a script\n */\n\nfunction generateNextPid() {\n let tempCounter = pidCounter; // Cap the number of search iterations at some arbitrary value to avoid\n // infinite loops. We'll assume that players wont have 1mil+ running scripts\n\n let found = false;\n\n for (let i = 0; i < 1e6;) {\n if (!_WorkerScripts__WEBPACK_IMPORTED_MODULE_0__[/* workerScripts */ \"a\"].has(tempCounter + i)) {\n found = true;\n tempCounter = tempCounter + i;\n break;\n }\n\n if (i === Number.MAX_SAFE_INTEGER - 1) {\n i = 1;\n } else {\n ++i;\n }\n }\n\n if (found) {\n pidCounter = tempCounter + 1;\n\n if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\nfunction resetPidCounter() {\n pidCounter = 1;\n}\n\n//# sourceURL=webpack:///./src/Netscript/Pid.ts?"); /***/ }), -/* 392 */ +/* 393 */ /*!***********************************!*\ !*** ./src/NetscriptFunctions.js ***! \***********************************/ @@ -2656,10 +2668,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptFunctions; });\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sprintf-js */ 471);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/RamCostGenerator */ 11);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Prestige */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 275);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Corporation/Actions */ 53);\n/* harmony import */ var _Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Corporation/data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Corporation/data/CorporationUpgrades */ 340);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Hacking */ 81);\n/* harmony import */ var _Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/formulas/grow */ 433);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Gang/Gang */ 393);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Gang/GangMemberTasks */ 177);\n/* harmony import */ var _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Gang/GangMemberUpgrades */ 154);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Faction/FactionWorkTypeEnum */ 125);\n/* harmony import */ var _Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Hacking/netscriptCanHack */ 406);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetNodes */ 197);\n/* harmony import */ var _Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetServers */ 180);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Hacknet/data/Constants */ 32);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./PersonObjects/formulas/skill */ 198);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Message/Message */ 97);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Missions */ 118);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Script/Script */ 285);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Script/RunningScript */ 276);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Server/ServerPurchases */ 173);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./StockMarket/StockMarketHelpers */ 156);\n/* harmony import */ var _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./StockMarket/data/OrderTypes */ 80);\n/* harmony import */ var _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./StockMarket/data/PositionTypes */ 52);\n/* harmony import */ var _StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./StockMarket/data/StockSymbols */ 68);\n/* harmony import */ var _StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./StockMarket/StockMarketCosts */ 219);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./TextFile */ 196);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./NetscriptWorker */ 124);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./JSInterpreter */ 439);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./NetscriptPort */ 263);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveHelpers */ 441);\n/* harmony import */ var _Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./Exploits/Exploit.ts */ 222);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ui/numeralFormat */ 3);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./utils/helpers/is2DArray */ 706);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../utils/LogBox */ 213);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 435);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 211);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultInterpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__[/* Interpreter */ \"a\"](\"\", () => undefined); // the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n\nfunction toNative(pseudoObj) {\n if (pseudoObj == null) return null;\n\n if (!pseudoObj.hasOwnProperty(\"properties\") || !pseudoObj.hasOwnProperty(\"getter\") || !pseudoObj.hasOwnProperty(\"setter\") || !pseudoObj.hasOwnProperty(\"proto\")) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj;\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n\n for (var key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n\n return nativeObj;\n}\n\nfunction NetscriptFunctions(workerScript) {\n const updateDynamicRam = function (fnName, ramCost) {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n\n workerScript.dynamicLoadedFns[fnName] = true;\n let threads = workerScript.scriptRef.threads;\n\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.serverIp}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost * threads;\n\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const scan = eval('ns.scan');\n\n * Using map access to do the same\n   const scan = ns['scan'];\n\n * Saving script in the improper order.\n   Increase the cost of an imported script, save it, then run the\n   parent. To fix this just re-open & save every script in order\n   from most imported to least imported (parent script).\n\n Sorry :(`);\n }\n };\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n\n\n const safeGetServer = function (ip, callingFnName = \"\") {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\n }\n\n return server;\n };\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n\n\n const getRunningScript = function (fn, ip, callingFnName, scriptArgs) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + `This is probably a bug. Please report to game developer`);\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (ip == null) {\n ip = workerScript.serverIp;\n }\n\n const server = safeGetServer(ip, callingFnName);\n return Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(fn, scriptArgs, server);\n } // If no arguments are specified, return the current RunningScript\n\n\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid, callingFnName) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const name of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"])) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][name];\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScriptByPid */ \"b\"])(pid, server);\n if (runningScript) return runningScript;\n }\n\n return null;\n };\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n\n\n const getCannotFindRunningScriptErrorMessage = function (fn, ip, scriptArgs) {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`;\n };\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n\n\n const checkTixApiAccess = function (callingFn = \"\") {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n\n\n const getStockFromSymbol = function (symbol, callingFn = \"\") {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n\n\n const failOnHacknetServer = function (server, callingFn = \"\") {\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__[/* HacknetServer */ \"a\"]) {\n workerScript.log(callingFn, `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n }; // Utility function to get Hacknet Node object\n\n\n const getHacknetNode = function (i, callingFn = \"\") {\n if (isNaN(i)) {\n throw makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n\n if (i < 0 || i >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length) {\n throw makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i]];\n\n if (hserver == null) {\n throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);\n }\n\n return hserver;\n } else {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i];\n }\n };\n\n const makeRuntimeErrorMsg = function (caller, msg) {\n const stack = new Error().stack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n\n for (const stackline of stack) {\n let filename;\n\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n\n if (!filename) continue;\n\n function parseChromeStackline(line) {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n\n if (lineMatch && funcMatch) {\n return {\n line: lineMatch[1],\n func: funcMatch[1]\n };\n }\n\n return null;\n }\n\n let call = {\n line: \"-1\",\n func: \"unknown\"\n };\n const chromeCall = parseChromeStackline(stackline);\n\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line) {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return {\n line: lineMatch[1],\n func: line.slice(0, lio)\n };\n }\n\n return null;\n }\n\n let firefoxCall = parseFirefoxStackline(stackline);\n\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, rejectMsg);\n };\n\n const checkFormulasAccess = function (func, n) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][n] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== n) {\n let extra = \"\";\n\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\n };\n\n const checkSingularityAccess = function (func, n) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 4) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const checkBladeburnerAccess = function (func, skipjoined = false) {\n const apiAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.some(a => {\n return a.n === 7;\n });\n\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n\n if (!skipjoined) {\n const bladeburnerAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"];\n\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func, city) {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities.hasOwnProperty(city)) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const checkSleeveAPIAccess = function (func) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 10 && !_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][10]) {\n throw makeRuntimeErrorMsg(`sleeve.${func}`, \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\");\n }\n };\n\n const checkSleeveNumber = function (func, sleeveNumber) {\n if (sleeveNumber >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, msg);\n throw makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getCodingContract = function (func, ip, fn) {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\n };\n\n const checkGangApiAccess = function (func) {\n const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__[/* Gang */ \"a\"];\n\n if (!hasAccess) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func, name) {\n for (const member of _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members) if (member.name === name) return member;\n\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func, name) {\n const task = _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__[/* GangMemberTasks */ \"a\"][name];\n\n if (!task) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const getBladeburnerActionObject = function (func, type, name) {\n const actionId = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionIdFromTypeAndName(type, name);\n\n if (!actionId) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n const actionObj = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionObject(actionId);\n\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const getCompany = function (func, name) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][name];\n\n if (company == null || !(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n throw makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n\n return company;\n };\n\n const getFaction = function (func, name) {\n if (!Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* factionExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n };\n\n const getAugmentation = function (func, name) {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* augmentationExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][name];\n };\n\n function getDivision(divisionName) {\n const division = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation.divisions.find(div => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName, cityName, materialName) {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName, productName) {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName, cityName, employeeName) {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find(e => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n const runAfterReset = function (cbScript = null) {\n //Run a script after reset\n if (cbScript && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(cbScript)) {\n const home = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n\n const runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__[/* RunningScript */ \"a\"](script, []); // No args\n\n runningScriptObj.threads = 1; // Only 1 thread\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* startWorkerScript */ \"e\"])(runningScriptObj, home);\n }\n }\n }\n };\n\n const hack = function (ip, manual, {\n threads: requestedThreads,\n stock\n } = {}) {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"hack\", requestedThreads);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n } // Calculate the hacking time\n\n\n var hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // This is in seconds\n // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg);\n }\n\n workerScript.log(\"hack\", `Executing ${ip} in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n var hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n var rand = Math.random();\n var expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n var expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n let maxThreadNeeded = Math.ceil(1 / percentHacked * (server.moneyAvailable / server.moneyMax));\n\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads; // Over-the-top safety checks\n\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n\n server.moneyAvailable -= moneyDrained;\n\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainMoney(moneyGained);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\"hack\", `Successfully hacked '${server.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerHack */ \"c\"])(server, moneyGained);\n }\n\n if (manual) {\n server.backdoorInstalled = true;\n }\n\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\"hack\", `Failed to hack '${server.hostname}'. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args) {\n let out = \"\";\n\n for (let arg of args) {\n arg = toNative(arg);\n\n if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n\n out += `${arg}`;\n }\n\n return out;\n };\n\n const functions = {\n hacknet: {\n numNodes: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length;\n },\n maxNumNodes: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"].MaxServers;\n }\n\n return Infinity;\n },\n purchaseNode: function () {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHacknet */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getPurchaseNodeCost: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetServer */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n } else {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetNode */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n },\n getNodeStats: function (i) {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const res = {\n name: hasUpgraded ? node.hostname : node.name,\n level: node.level,\n ram: hasUpgraded ? node.maxRam : node.ram,\n cores: node.cores,\n production: hasUpgraded ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: hasUpgraded ? node.totalHashesGenerated : node.totalMoneyGenerated\n };\n\n if (hasUpgraded) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseLevelUpgrade */ \"n\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeRam: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseRamUpgrade */ \"o\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCore: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCoreUpgrade */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCache: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n const res = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCacheUpgrade */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n\n if (res) {\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n\n return res;\n },\n getLevelUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.hashes;\n },\n hashCapacity: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.capacity;\n },\n hashCost: function (upgName) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName, upgTarget) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHashUpgrade */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName) {\n const level = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.upgrades[upgName];\n\n if (level === undefined) {\n throw makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return level;\n },\n getStudyMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getStudyMult();\n },\n getTrainingMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getTrainingMult();\n }\n },\n sprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"],\n vsprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"],\n scan: function (ip = workerScript.serverIp, hostnames = true) {\n updateDynamicRam(\"scan\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scan\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n\n var out = [];\n\n for (var i = 0; i < server.serversOnNetwork.length; i++) {\n var entry;\n\n if (hostnames) {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).hostname;\n } else {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).ip;\n }\n\n if (entry == null) {\n continue;\n }\n\n out.push(entry);\n }\n\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"hack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hack\"));\n return hack(ip, false, {\n threads: requestedThreads,\n stock: stock\n });\n },\n hackAnalyzeThreads: function (ip, hackAmount) {\n updateDynamicRam(\"hackAnalyzeThreads\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzeThreads\")); // Check argument validity\n\n const server = safeGetServer(ip, \"hackAnalyzeThreads\");\n\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(workerScript, `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`);\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyzePercent: function (ip) {\n updateDynamicRam(\"hackAnalyzePercent\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzePercent\"));\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * 100;\n },\n hackChance: function (ip) {\n updateDynamicRam(\"hackChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackChance\"));\n const server = safeGetServer(ip, \"hackChance\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n sleep: function (time) {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n\n workerScript.log(\"sleep\", `Sleeping for ${time} milliseconds`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"grow\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"grow\"));\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"grow\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\n }\n\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp); // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanGrow */ \"a\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg);\n }\n\n var growTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"grow\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(growTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* processSingleServerGrowth */ \"g\"])(server, threads, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.ip, threads);\n var expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\"grow\", `Available money on '${server.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatPercentage(logGrowPercent, 6)}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerGrow */ \"b\"])(server, moneyAfter - moneyBefore);\n }\n\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (ip, growth) {\n updateDynamicRam(\"growthAnalyze\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"growthAnalyze\")); // Check argument validity\n\n const server = safeGetServer(ip, \"growthAnalyze\");\n\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* numCycleForGrowth */ \"e\"])(server, Number(growth), _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n weaken: function (ip, {\n threads: requestedThreads\n } = {}) {\n updateDynamicRam(\"weaken\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"weaken\"));\n var threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"weaken\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\n } // No root access or skill level too low\n\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanWeaken */ \"c\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg);\n }\n\n const weakenTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"weaken\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(weakenTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.ip, threads);\n const expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n workerScript.log(\"weaken\", `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n return Promise.resolve(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads);\n });\n },\n print: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n\n workerScript.print(argsToString(arguments));\n },\n tprint: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(`${workerScript.scriptRef.filename}: ${argsToString(arguments)}`);\n },\n tprintf: function (format, ...args) {\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(Object(sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"])(format, args));\n },\n clearLog: function () {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn) {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n\n workerScript.log(\"disableLog\", `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn, ip, ...scriptArgs) {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n let runningScriptObj;\n\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, ip, \"tail\", scriptArgs);\n }\n\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_75__[/* logBoxCreate */ \"a\"])(runningScriptObj);\n },\n nuke: function (ip) {\n updateDynamicRam(\"nuke\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"nuke\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n\n return true;\n },\n brutessh: function (ip) {\n updateDynamicRam(\"brutessh\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"brutessh\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n ftpcrack: function (ip) {\n updateDynamicRam(\"ftpcrack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ftpcrack\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n relaysmtp: function (ip) {\n updateDynamicRam(\"relaysmtp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"relaysmtp\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n httpworm: function (ip) {\n updateDynamicRam(\"httpworm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"httpworm\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n sqlinject: function (ip) {\n updateDynamicRam(\"sqlinject\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sqlinject\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n run: function (scriptname, threads = 1) {\n updateDynamicRam(\"run\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"run\"));\n\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"run\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n },\n exec: function (scriptname, ip, threads = 1) {\n updateDynamicRam(\"exec\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"exec\"));\n\n if (scriptname === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 3; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"exec\", server, scriptname, argsForNewScript, workerScript, threads);\n },\n spawn: function (scriptname, threads) {\n updateDynamicRam(\"spawn\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"spawn\"));\n\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"spawn\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n }, spawnDelay * 1e3);\n workerScript.log(\"spawn\", `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"spawn\", \"Exiting...\");\n }\n },\n kill: function (filename, ip, ...scriptArgs) {\n updateDynamicRam(\"kill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"kill\"));\n let res;\n const killByPid = typeof filename === \"number\";\n\n if (killByPid) {\n // Kill by pid\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(filename);\n } else {\n // Kill by filename/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, scriptArgs));\n return false;\n }\n\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(runningScriptObj, server.ip);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `Killing '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}.`);\n }\n\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`);\n }\n\n return false;\n }\n },\n killall: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"killall\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"killall\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\n\n const scriptsRunning = server.runningScripts.length > 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n workerScript.log(\"killall\", `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n return scriptsRunning;\n },\n exit: function () {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"exit\", \"Exiting...\");\n } else {\n workerScript.log(\"exit\", \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: function (scriptname, ip1, ip2) {\n updateDynamicRam(\"scp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scp\"));\n\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n var res = false;\n scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return res;\n } // Invalid file type\n\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n } // Invalid file name\n\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n var destServer, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip2);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n var found = false;\n\n for (var i = 0; i < currServ.messages.length; ++i) {\n if (!(currServ.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for text files\n\n\n if (scriptname.endsWith(\".txt\")) {\n var found = false,\n txtFile;\n\n for (var i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n found = true;\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n }\n }\n\n var newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_61__[/* TextFile */ \"a\"](txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for script files\n\n\n let sourceScript = null;\n\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n } // Overwrite script if it already exists\n\n\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", `WARNING: File '${scriptname}' overwritten on '${destServer.hostname}'`);\n const oldScript = destServer.scripts[i]; // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n\n if (oldScript.code === sourceScript.code) return true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return true;\n }\n } // Create new script if it does not already exist\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.ip;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n },\n ls: function (ip, grep) {\n updateDynamicRam(\"ls\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ls\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n } // Get the grep filter, if one exists\n\n\n let filter = false;\n\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n if (server.messages[i].filename.includes(filter)) {\n allFiles.push(server.messages[i].filename);\n }\n } else if (server.messages[i].includes(filter)) {\n allFiles.push(server.messages[i]);\n }\n } else {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n allFiles.push(server.messages[i].filename);\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n }\n\n for (var i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (var i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n } // Sort the files alphabetically then print each\n\n\n allFiles.sort();\n return allFiles;\n },\n ps: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"ps\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ps\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\n\n const processes = [];\n\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid\n });\n }\n\n return processes;\n },\n hasRootAccess: function (ip) {\n updateDynamicRam(\"hasRootAccess\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hasRootAccess\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n\n return server.hasAdminRights;\n },\n getIp: function () {\n updateDynamicRam(\"getIp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getIp\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.ip;\n },\n getHostname: function () {\n updateDynamicRam(\"getHostname\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHostname\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(workerScript, \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.hostname;\n },\n getHackingLevel: function () {\n updateDynamicRam(\"getHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingLevel\"));\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].updateSkillLevels();\n workerScript.log(\"getHackingLevel\", `returned ${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill;\n },\n getHackingMultipliers: function () {\n updateDynamicRam(\"getHackingMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingMultipliers\"));\n return {\n chance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n speed: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n growth: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult\n };\n },\n getHacknetMultipliers: function () {\n updateDynamicRam(\"getHacknetMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHacknetMultipliers\"));\n return {\n production: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n purchaseCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n ramCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n coreCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n levelCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult\n };\n },\n getBitNodeMultipliers: function () {\n updateDynamicRam(\"getBitNodeMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getBitNodeMultipliers\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n\n let copy = Object.assign({}, _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"]);\n return copy;\n },\n getServer: function (ip) {\n updateDynamicRam(\"getServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServer\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server); // These fields should be hidden.\n\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n return copy;\n },\n getServerMoneyAvailable: function (ip) {\n updateDynamicRam(\"getServerMoneyAvailable\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\"getServerMoneyAvailable\", `returned player's money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber())}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber();\n }\n\n workerScript.log(\"getServerMoneyAvailable\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.hackDifficulty, 3)} for '${server.hostname}'`);\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerBaseSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerBaseSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.baseDifficulty, 3)} for '${server.hostname}'`);\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerMinSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerMinSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.minDifficulty, 3)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (ip) {\n updateDynamicRam(\"getServerRequiredHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerRequiredHackingLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatSkill(server.requiredHackingSkill, 0)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (ip) {\n updateDynamicRam(\"getServerMaxMoney\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n\n workerScript.log(\"getServerMaxMoney\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth: function (ip) {\n updateDynamicRam(\"getServerGrowth\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n\n workerScript.log(\"getServerGrowth\", `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (ip) {\n updateDynamicRam(\"getServerNumPortsRequired\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"getServerNumPortsRequired\");\n\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n\n workerScript.log(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip) {\n updateDynamicRam(\"getServerRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRam\"));\n const server = safeGetServer(ip, \"getServerRam\");\n workerScript.log(\"getServerRam\", `returned [${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}, ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}]`);\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (ip) {\n updateDynamicRam(\"getServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip) {\n updateDynamicRam(\"getServerUsedRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}`);\n return server.ramUsed;\n },\n serverExists: function (ip) {\n updateDynamicRam(\"serverExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"serverExists\"));\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip) !== null;\n },\n fileExists: function (filename, ip = workerScript.serverIp) {\n updateDynamicRam(\"fileExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"fileExists\"));\n\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n\n for (var i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(filename, server);\n\n if (txtFile != null) {\n return true;\n }\n\n return false;\n },\n isRunning: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n updateDynamicRam(\"isRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isRunning\"));\n\n if (fn === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function () {\n updateDynamicRam(\"getStockSymbols\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(_StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__[/* StockSymbols */ \"a\"]);\n },\n getStockPrice: function (symbol) {\n updateDynamicRam(\"getStockPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n return stock.price;\n },\n getStockAskPrice: function (symbol) {\n updateDynamicRam(\"getStockAskPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol) {\n updateDynamicRam(\"getStockBidPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol) {\n updateDynamicRam(\"getStockPosition\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n var stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol) {\n updateDynamicRam(\"getStockMaxShares\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockPurchaseCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return Infinity;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getBuyTransactionCost */ \"b\"])(stock, shares, pos);\n\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getStockSaleGain: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockSaleGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return 0;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getSellTransactionGain */ \"c\"])(stock, shares, pos);\n\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock: function (symbol, shares) {\n updateDynamicRam(\"buyStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* buyStock */ \"a\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol, shares) {\n updateDynamicRam(\"sellStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellStock */ \"c\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n shortStock: function (symbol, shares) {\n updateDynamicRam(\"shortStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"], \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"shortStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellShort: function (symbol, shares) {\n updateDynamicRam(\"sellShort\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(\"sellShort\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellShort */ \"b\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n placeOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"placeOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"placeOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n let orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* placeOrder */ \"j\"])(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"cancelOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFrom(symbol, \"cancelOrder\");\n\n if (isNaN(shares) || isNaN(price)) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n\n var orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n\n var params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos\n };\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* cancelOrder */ \"c\"])(params, workerScript);\n },\n getOrders: function () {\n updateDynamicRam(\"getOrders\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(workerScript, \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders = {};\n const stockMarketOrders = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* StockMarket */ \"a\"][\"Orders\"];\n\n for (let symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos\n });\n }\n }\n }\n\n return orders;\n },\n getStockVolatility: function (symbol) {\n updateDynamicRam(\"getStockVolatility\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockVolatility\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol) {\n updateDynamicRam(\"getStockForecast\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockForecast\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\n var forecast = 50;\n stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n updateDynamicRam(\"purchase4SMarketData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\n },\n getPurchasedServerLimit: function () {\n updateDynamicRam(\"getPurchasedServerLimit\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerLimit\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])();\n },\n getPurchasedServerMaxRam: function () {\n updateDynamicRam(\"getPurchasedServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerMaxRam\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerMaxRam */ \"c\"])();\n },\n getPurchasedServerCost: function (ram) {\n updateDynamicRam(\"getPurchasedServerCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerCost\"));\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (hostname, ram) {\n updateDynamicRam(\"purchaseServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length >= Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()) {\n workerScript.log(\"purchaseServer\", `You have reached the maximum limit of ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()} servers. You cannot purchase any more.`);\n return \"\";\n }\n\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"purchaseServer\", `Not enough money to purchase server. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return \"\";\n }\n\n var newServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(newServ);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.push(newServ.ip);\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n workerScript.log(\"purchaseServer\", `Purchased new server with hostname '${newServ.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return newServ.hostname;\n },\n deleteServer: function (hostname) {\n updateDynamicRam(\"deleteServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"deleteServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* GetServerByHostname */ \"a\"])(hostnameStr);\n\n if (server == null) {\n workerScript.log(\"deleteServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", \"Cannot delete non-purchased server.\");\n return false;\n }\n\n var ip = server.ip; // Can't delete server you're currently connected to\n\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", \"You are currently connected to the server you are trying to delete.\");\n return false;\n } // A server cannot delete itself\n\n\n if (ip === workerScript.serverIp) {\n workerScript.log(\"deleteServer\", \"Cannot delete the server this script is running on.\");\n return false;\n } // Delete all scripts running on server\n\n\n if (server.runningScripts.length > 0) {\n workerScript.log(\"deleteServer\", `Cannot delete server '${server.hostname}' because it still has scripts running.`);\n return false;\n } // Delete from player's purchasedServers array\n\n\n var found = false;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length; ++i) {\n if (ip == _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers[i]) {\n found = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"deleteServer\", `Could not identify server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n } // Delete from all servers\n\n\n delete _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][ip]; // Delete from home computer\n\n found = false;\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (ip == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", `Deleted server '${hostnameStr}`);\n return true;\n }\n } // Wasn't found on home computer\n\n\n workerScript.log(\"deleteServer\", `Could not find server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: function (hostname = true) {\n updateDynamicRam(\"getPurchasedServers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServers\"));\n var res = [];\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.forEach(function (ip) {\n if (hostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port, data = \"\", mode = \"a\") {\n updateDynamicRam(\"write\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"write\"));\n\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"write\", `Trying to write to invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.write(data);\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Write to script or text file\n let fn = port;\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* removeLeadingSlash */ \"h\"])(fn);\n } // Coerce 'data' to be a string\n\n\n try {\n data = String(data);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n // Create a new script\n script = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](fn, data, server.ip, server.scripts);\n server.scripts.push(script);\n return true;\n }\n\n mode === \"w\" ? script.code = data : script.code += data;\n script.updateRamUsage(server.scripts);\n script.markUpdated();\n } else {\n // Write to text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile == null) {\n txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* createTextFile */ \"b\"])(fn, data, server);\n return true;\n }\n\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n\n return true;\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWrite: function (port, data = \"\") {\n updateDynamicRam(\"tryWrite\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"tryWrite\"));\n\n if (!isNaN(port)) {\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port) {\n updateDynamicRam(\"read\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"read\"));\n\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"read\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.read();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Read from script or text file\n let fn = port;\n let server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Read from script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n return \"\";\n }\n\n return script.code;\n } else {\n // Read from text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port) {\n updateDynamicRam(\"peek\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"peek\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.peek();\n },\n clear: function (port) {\n updateDynamicRam(\"clear\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"clear\"));\n\n if (!isNaN(port)) {\n // Clear port\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"clear\", `Trying to clear invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.clear();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Clear text file\n var fn = port;\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${port}`);\n }\n\n return 0;\n },\n getPortHandle: function (port) {\n updateDynamicRam(\"getPortHandle\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPortHandle\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port} Must be an integer between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}.`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port;\n },\n rm: function (fn, ip) {\n updateDynamicRam(\"rm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.serverIp;\n }\n\n const s = safeGetServer(ip, \"rm\");\n const status = s.removeFile(fn);\n\n if (!status.res) {\n workerScript.log(\"rm\", status.msg);\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname, ip) {\n updateDynamicRam(\"scriptRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptRunning\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n\n return false;\n },\n scriptKill: function (scriptname, ip) {\n updateDynamicRam(\"scriptKill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptKill\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\n\n var suc = false;\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip);\n suc = true;\n }\n }\n\n return suc;\n },\n getScriptName: function () {\n return workerScript.name;\n },\n getScriptRam: function (scriptname, ip = workerScript.serverIp) {\n updateDynamicRam(\"getScriptRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptRam\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n\n return 0;\n },\n getRunningScript: function (fn, ip) {\n updateDynamicRam(\"getRunningScript\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getRunningScript\"));\n let runningScript;\n\n if (arguments.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n scriptArgs.push(arguments[i]);\n }\n\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\n }\n\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads\n };\n },\n getHackTime: function (ip) {\n updateDynamicRam(\"getHackTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackTime\"));\n const server = safeGetServer(ip, \"getHackTime\");\n\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getGrowTime: function (ip) {\n updateDynamicRam(\"getGrowTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getGrowTime\"));\n const server = safeGetServer(ip, \"getGrowTime\");\n\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getWeakenTime: function (ip) {\n updateDynamicRam(\"getWeakenTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"getWeakenTime\");\n\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getScriptIncome: function (scriptname, ip) {\n updateDynamicRam(\"getScriptIncome\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptIncome\"));\n\n if (arguments.length === 0) {\n var res = []; // First element is total income of all currently running scripts\n\n let total = 0;\n\n for (const script of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n res.push(total); // Second element is total income you've earned from scripts since you installed Augs\n\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug / (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptIncome\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname, ip) {\n updateDynamicRam(\"getScriptExpGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptExpGain\"));\n\n if (arguments.length === 0) {\n var total = 0;\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n\n return total;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptExpGain\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n, format) {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].format(parseFloat(n), format);\n },\n tFormat: function (milliseconds, milliPrecision = false) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function () {\n updateDynamicRam(\"getTimeSinceLastAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getTimeSinceLastAug\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug;\n },\n prompt: function (txt) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(txt)) {\n txt = JSON.stringify(txt);\n } // The id for this popup will consist of the first 20 characters of the prompt string..\n // Thats hopefully good enough to be unique\n\n\n const popupId = `prompt-popup-${txt.slice(0, 20)}`;\n const textElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: txt\n });\n return new Promise(function (resolve) {\n const yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"Yes\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(true);\n }\n });\n const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"No\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(false);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__[/* createPopup */ \"a\"])(popupId, [textElement, yesBtn, noBtn]);\n });\n },\n wget: async function (url, target, ip = workerScript.serverIp) {\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n\n var s = safeGetServer(ip, \"wget\");\n return new Promise(function (resolve) {\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n workerScript.log(\"wget\", \"Failed.\");\n return resolve(false);\n }\n\n if (res.overwritten) {\n workerScript.log(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\n return resolve(true);\n }, \"text\").fail(function (e) {\n workerScript.log(\"wget\", JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function () {\n updateDynamicRam(\"getFavorToDonate\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFavorToDonate\"));\n return Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n },\n\n /* Singularity Functions */\n universityCourse: function (universityName, className) {\n updateDynamicRam(\"universityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"universityCourse\"));\n checkSingularityAccess(\"universityCourse\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"universityCourse\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"universityCourse\", txt);\n }\n\n var costMult, expMult;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Summit University' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n var task;\n\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience;\n break;\n\n case \"Data Structures\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassDataStructures;\n break;\n\n case \"Networks\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassNetworks;\n break;\n\n case \"Algorithms\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassAlgorithms;\n break;\n\n case \"Management\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassManagement;\n break;\n\n case \"Leadership\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassLeadership;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid class name: ${className}.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, task);\n workerScript.log(\"universityCourse\", `Started ${task} at ${universityName}`);\n return true;\n },\n gymWorkout: function (gymName, stat) {\n updateDynamicRam(\"gymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gymWorkout\"));\n checkSingularityAccess(\"gymWorkout\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"gymWorkout\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"gymWorkout\", txt);\n }\n\n var costMult, expMult;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n break;\n\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n break;\n\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n break;\n\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid stat: ${stat}.`);\n return false;\n }\n\n workerScript.log(\"gymWorkout\", `Started training ${stat} at ${gymName}`);\n return true;\n },\n travelToCity: function (cityname) {\n updateDynamicRam(\"travelToCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"travelToCity\"));\n checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Chongqing:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].NewTokyo:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Ishima:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven:\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n purchaseTor: function () {\n updateDynamicRam(\"purchaseTor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseTor\"));\n checkSingularityAccess(\"purchaseTor\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] != null) {\n workerScript.log(\"purchaseTor\", \"You already have a TOR router!\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost);\n var darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName) {\n updateDynamicRam(\"purchaseProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseProgram\"));\n checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] == null) {\n workerScript.log(\"purchaseProgram\", \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n let item = null;\n\n for (const key in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(item.price)) {\n workerScript.log(\"purchaseProgram\", `Not enough money to purchase '${item.program}'. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(item.price)}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", `You already have the '${item.program}' program`);\n return true;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n workerScript.log(\"purchaseProgram\", `You have purchased the '${item.program}' program. The new program can be found on your home computer.`);\n return true;\n },\n getCurrentServer: function () {\n updateDynamicRam(\"getCurrentServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().hostname;\n },\n connect: function (hostname) {\n updateDynamicRam(\"connect\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n let target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(hostname);\n\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\n }\n\n if (hostname === \"home\") {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i);\n\n if (other.ip == hostname || other.hostname == hostname) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = target.ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function () {\n updateDynamicRam(\"manualHack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function () {\n updateDynamicRam(\"installBackdoor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installBackdoor\"));\n checkSingularityAccess(\"installBackdoor\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n const installTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) / 4 * 1000; // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg);\n }\n\n workerScript.log(\"installBackdoor\", `Installing backdoor on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(installTime, true)}`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n workerScript.log(\"installBackdoor\", `Successfully installed backdoor on '${server.hostname}'`);\n server.backdoorInstalled = true;\n return Promise.resolve();\n });\n },\n getStats: function () {\n updateDynamicRam(\"getStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n return {\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence\n };\n },\n getCharacterInformation: function () {\n updateDynamicRam(\"getCharacterInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCharacterInformation\"));\n checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", `getCharacterInformation is deprecated, please use getPlayer`);\n return {\n bitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n jobTitles: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n mult: {\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n companyRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n crimeMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crimeSuccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n factionRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n workMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult\n },\n timeWorked: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].timeWorked,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n workHackExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charismaExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp\n };\n },\n getPlayer: function () {\n updateDynamicRam(\"getPlayer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPlayer\"));\n const data = {\n hacking_skill: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n max_hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence,\n hacking_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n hacking_speed_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n hacking_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n hacking_grow_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult,\n hacking_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strength_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defense_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterity_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agility_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charisma_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp,\n hacking_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n strength_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n defense_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n dexterity_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n agility_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n charisma_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_mult,\n hacking_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n defense_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n agility_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n charisma_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp_mult,\n company_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n faction_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n numPeopleKilled: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].numPeopleKilled,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber(),\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n location: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location,\n companyName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName,\n crime_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crime_success_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n isWorking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking,\n workType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workType,\n currentWorkFactionName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionName,\n currentWorkFactionDescription: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionDescription,\n workHackExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGainRate,\n workStrExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGainRate,\n workDefExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGainRate,\n workDexExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGainRate,\n workAgiExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGainRate,\n workChaExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGainRate,\n workRepGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGainRate,\n workMoneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGainRate,\n workMoneyLossRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyLossRate,\n workHackExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n createProgramName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramName,\n createProgramReqLvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramReqLvl,\n className: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].className,\n crimeType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crimeType,\n work_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult,\n hacknet_node_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult,\n hasWseAccount: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount,\n hasTixApiAccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess,\n has4SData: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData,\n has4SDataTixApi: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi,\n bladeburner_max_stamina_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_analysis_mult,\n bladeburner_success_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_success_chance_mult,\n bitNodeN: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n totalPlaytime: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].totalPlaytime,\n playtimeSinceLastAug: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug,\n playtimeSinceLastBitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastBitnode,\n jobs: {},\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")\n };\n Object.assign(data.jobs, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs);\n return data;\n },\n hospitalize: function () {\n updateDynamicRam(\"hospitalize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hospitalize();\n },\n isBusy: function () {\n updateDynamicRam(\"isBusy\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking || _Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"];\n },\n stopAction: function () {\n updateDynamicRam(\"stopAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"stopAction\"));\n checkSingularityAccess(\"stopAction\", 1);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"stopAction\", txt);\n return true;\n }\n\n return false;\n },\n upgradeHomeRam: function () {\n updateDynamicRam(\"upgradeHomeRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"upgradeHomeRam\"));\n checkSingularityAccess(\"upgradeHomeRam\", 2); // Check if we're at max RAM\n\n const homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"upgradeHomeRam\", `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`);\n return true;\n },\n getUpgradeHomeRamCost: function () {\n updateDynamicRam(\"getUpgradeHomeRamCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName) {\n updateDynamicRam(\"workForCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForCompany\"));\n checkSingularityAccess(\"workForCompany\", 2); // Sanitize input\n\n if (companyName == null) {\n companyName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName;\n } // Make sure its a valid company\n\n\n if (companyName == null || companyName === \"\" || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n workerScript.log(\"workForCompany\", `Invalid company: '${companyName}'`);\n return false;\n } // Make sure player is actually employed at the comapny\n\n\n if (!Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", `You do not have a job at '${companyName}'`);\n return false;\n } // Cant work while in a mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForCompany\", \"You are in the middle of a mission.\");\n return false;\n } // Check to make sure company position data is valid\n\n\n const companyPositionName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPositionName === \"\" || !(companyPosition instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__[/* CompanyPosition */ \"a\"])) {\n workerScript.log(\"workForCompany\", \"You do not have a job\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForCompany\", txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWorkPartTime(companyName);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWork(companyName);\n }\n\n workerScript.log(\"workForCompany\", `Began working at '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName, field) {\n updateDynamicRam(\"applyToCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"applyToCompany\"));\n checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = companyName;\n var res;\n\n switch (field.toLowerCase()) {\n case \"software\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareJob(true);\n break;\n\n case \"software consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareConsultantJob(true);\n break;\n\n case \"it\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForItJob(true);\n break;\n\n case \"security engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityEngineerJob(true);\n break;\n\n case \"network engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForNetworkEngineerJob(true);\n break;\n\n case \"business\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessJob(true);\n break;\n\n case \"business consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessConsultantJob(true);\n break;\n\n case \"security\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityJob(true);\n break;\n\n case \"agent\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForAgentJob(true);\n break;\n\n case \"employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForEmployeeJob(true);\n break;\n\n case \"part-time employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeEmployeeJob(true);\n break;\n\n case \"waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForWaiterJob(true);\n break;\n\n case \"part-time waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeWaiterJob(true);\n break;\n\n default:\n workerScript.log(\"applyToCompany\", `Invalid job: '${field}'.`);\n return false;\n } // The Player object's applyForJob function can return string with special error messages\n\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res)) {\n workerScript.log(\"applyToCompany\", res);\n return false;\n }\n\n if (res) {\n workerScript.log(\"applyToCompany\", `You were offered a new job at '${companyName}' as a '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName]}'`);\n } else {\n workerScript.log(\"applyToCompany\", `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`);\n }\n\n return res;\n },\n getCompanyRep: function (companyName) {\n updateDynamicRam(\"getCompanyRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName) {\n updateDynamicRam(\"getCompanyFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName) {\n updateDynamicRam(\"getCompanyFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function () {\n updateDynamicRam(\"checkFactionInvitations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2); // Make a copy of Player.factionInvitations\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.slice();\n },\n joinFaction: function (name) {\n updateDynamicRam(\"joinFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"joinFaction\"));\n checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", `You have not been invited by faction '${name}'`);\n return false;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* joinFaction */ \"d\"])(fac); // Update Faction Invitation list to account for joined + banned factions\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i] == name || _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name, type) {\n updateDynamicRam(\"workForFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForFaction\"));\n checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name); // if the player is in a gang and the target faction is any of the gang faction, fail\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang() && _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][name] !== undefined) {\n workerScript.log(\"workForFaction\", `Faction '${name}' does not offer work at the moment.`);\n return;\n }\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForFaction\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(name)) {\n workerScript.log(\"workForFaction\", `You are not a member of '${name}'`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForFaction\", txt);\n }\n\n var fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name]; // Arrays listing factions that allow each time of work\n\n var hackAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Netburners\", \"Tian Di Hui\", \"CyberSec\"];\n var fdWkAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Tetrads\", \"Slum Snakes\"];\n var scWkAvailable = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Syndicate\", \"Tetrads\", \"Slum Snakes\", \"Tian Di Hui\"];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionHackWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionFieldWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out field missions for '${fac.name}'`);\n return true;\n\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionSecurityWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out security work for '${fac.name}'`);\n return true;\n\n default:\n workerScript.log(\"workForFaction\", `Invalid work type: '${type}`);\n }\n\n return true;\n },\n getFactionRep: function (name) {\n updateDynamicRam(\"getFactionRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name) {\n updateDynamicRam(\"getFactionFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name) {\n updateDynamicRam(\"getFactionFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name, amt) {\n updateDynamicRam(\"donateToFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"donateToFaction\"));\n checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", `Invalid donation amount: '${amt}'.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(amt)) {\n workerScript.log(\"donateToFaction\", `You do not have enough money to donate ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} to '${name}'`);\n return false;\n }\n\n const repNeededToDonate = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\"donateToFaction\", `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`);\n return false;\n }\n\n const repGain = amt / _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult;\n faction.playerReputation += repGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(amt);\n workerScript.log(\"donateToFaction\", `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} donated to '${name}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatReputation(repGain)} reputation`);\n return true;\n },\n createProgram: function (name) {\n updateDynamicRam(\"createProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"createProgram\"));\n checkSingularityAccess(\"createProgram\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"createProgram\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"createProgram\", txt);\n }\n\n name = name.toLowerCase();\n let p = null;\n\n for (const key in _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"]) {\n if (_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key].name.toLowerCase() == name) {\n p = _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key];\n }\n }\n\n if (p == null) {\n workerScript.log(\"createProgram\", `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(p.name)) {\n workerScript.log(\"createProgram\", `You already have the '${p.name}' program`);\n return false;\n }\n\n if (!p.create.req(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n workerScript.log(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${p.create.level} req)`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startCreateProgramWork(p.name, p.create.time, p.create.level);\n workerScript.log(\"createProgram\", `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName) {\n updateDynamicRam(\"commitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"commitCrime\"));\n checkSingularityAccess(\"commitCrime\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"commitCrime\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"commitCrime\", txt);\n } // Set Location to slums\n\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Slums);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n // couldn't find crime\n throw makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n\n workerScript.log(\"commitCrime\", `Attempting to commit ${crime.name}...`);\n return crime.commit(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], 1, {\n workerscript: workerScript\n });\n },\n getCrimeChance: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getCrimeStats: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased = false) {\n updateDynamicRam(\"getOwnedAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedAugmentations\"));\n checkSingularityAccess(\"getOwnedAugmentations\", 3);\n var res = [];\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[i].name);\n }\n\n if (purchased) {\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[i].name);\n }\n }\n\n return res;\n },\n getOwnedSourceFiles: function () {\n updateDynamicRam(\"getOwnedSourceFiles\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n let res = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n res.push({\n n: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].n,\n lvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].lvl\n });\n }\n\n return res;\n },\n getAugmentationsFromFaction: function (facname) {\n updateDynamicRam(\"getAugmentationsFromFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationsFromFaction\"));\n checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname); // If player has a gang with this faction, return all augmentations.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(facname)) {\n const res = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name) {\n updateDynamicRam(\"getAugmentationCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name) {\n updateDynamicRam(\"getAugmentationPrereq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name) {\n updateDynamicRam(\"getAugmentationPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name) {\n updateDynamicRam(\"getAugmentationRepReq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name) {\n updateDynamicRam(\"getAugmentationStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationStats\"));\n checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction, name) {\n updateDynamicRam(\"purchaseAugmentation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseAugmentation\"));\n checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n let augs = [];\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(faction)) {\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const tempAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\n return false;\n }\n\n const isNeuroflux = aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor;\n\n if (!isNeuroflux) {\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* purchaseAugmentation */ \"f\"])(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", res);\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res) && res.startsWith(\"You purchased\")) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript) {\n updateDynamicRam(\"softReset\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"softReset\"));\n checkSingularityAccess(\"softReset\", 3);\n workerScript.log(\"softReset\", \"Soft resetting. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n runAfterReset(cbScript);\n }, 0); // Prevent workerScript from \"finishing execution naturally\"\n\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n installAugmentations: function (cbScript) {\n updateDynamicRam(\"installAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installAugmentations\"));\n checkSingularityAccess(\"installAugmentations\", 3);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", \"You do not have any Augmentations to be installed.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* installAugmentations */ \"d\"])();\n runAfterReset(cbScript);\n }, 0);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n // Gang API\n gang: {\n createGang: function (faction) {\n updateDynamicRam(\"createGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"createGang\")); // this list is copied from Faction/ui/Root.tsx\n\n const GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].canAccessGang() || !GangNames.includes(faction)) return false;\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang()) return false;\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(faction)) return false;\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startGang(faction, isHacking);\n return true;\n },\n inGang: function () {\n updateDynamicRam(\"inGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"inGang\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang();\n },\n getMemberNames: function () {\n updateDynamicRam(\"getMemberNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members.map(member => member.name);\n },\n getGangInformation: function () {\n updateDynamicRam(\"getGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n return {\n faction: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName,\n isHacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.isHackingGang,\n moneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.moneyGainRate,\n power: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getPower(),\n respect: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respect,\n respectGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respectGainRate,\n territory: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getTerritory(),\n territoryClashChance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryClashChance,\n territoryWarfareEngaged: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged,\n wantedLevel: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wanted,\n wantedLevelGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wantedGainRate\n };\n },\n getOtherGangInformation: function () {\n updateDynamicRam(\"getOtherGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy = {};\n\n for (const gang in _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"]) {\n cpy[gang] = Object.assign({}, _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name) {\n updateDynamicRam(\"getMemberInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice()\n };\n },\n canRecruitMember: function () {\n updateDynamicRam(\"canRecruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.canRecruitMember();\n },\n recruitMember: function (name) {\n updateDynamicRam(\"recruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const recruited = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.recruitMember(name);\n\n if (recruited) {\n workerScript.log(\"recruitMember\", `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"recruitMember\", `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function () {\n updateDynamicRam(\"getTaskNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const tasks = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName, taskName) {\n updateDynamicRam(\"setMemberTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n\n if (success) {\n workerScript.log(\"setMemberTask\", `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`);\n } else {\n workerScript.log(\"setMemberTask\", `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`);\n }\n\n return success;\n },\n getTaskStats: function (taskName) {\n updateDynamicRam(\"getTaskStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function () {\n updateDynamicRam(\"getEquipmentNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(_Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"]);\n },\n getEquipmentCost: function (equipName) {\n updateDynamicRam(\"getEquipmentCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg === null) return Infinity;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName) {\n updateDynamicRam(\"getEquipmentType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName) {\n updateDynamicRam(\"getEquipmentStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n\n if (!equipment) {\n throw makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n\n return Object.assign({}, equipment.mults);\n },\n purchaseEquipment: function (memberName, equipName) {\n updateDynamicRam(\"purchaseEquipment\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang);\n\n if (res) {\n workerScript.log(\"purchaseEquipment\", `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\"purchaseEquipment\", `Failed to purchase '${equipName}' for Gang member '${memberName}'`);\n }\n\n return res;\n },\n ascendMember: function (name) {\n updateDynamicRam(\"ascendMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.ascendMember(member, workerScript);\n },\n setTerritoryWarfare: function (engage) {\n updateDynamicRam(\"setTerritoryWarfare\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n\n if (engage) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = true;\n workerScript.log(\"setTerritoryWarfare\", \"Engaging in Gang Territory Warfare\");\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = false;\n workerScript.log(\"setTerritoryWarfare\", \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang) {\n updateDynamicRam(\"getChanceToWinClash\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n\n if (_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang] == null) {\n throw makeRuntimeErrorMsg(`gang.${getChanceToWinClash}`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName].power;\n const otherPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang].power;\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.storedCycles / 5);\n }\n },\n // end gang namespace\n // Bladeburner API\n bladeburner: {\n getContractNames: function () {\n updateDynamicRam(\"getContractNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function () {\n updateDynamicRam(\"getOperationNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function () {\n updateDynamicRam(\"getBlackOpNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name = \"\") {\n updateDynamicRam(\"getBlackOpRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function () {\n updateDynamicRam(\"getGeneralActionNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function () {\n updateDynamicRam(\"getSkillNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type = \"\", name = \"\") {\n updateDynamicRam(\"startAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.startActionNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function () {\n updateDynamicRam(\"stopBladeburnerAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.resetAction();\n },\n getCurrentAction: function () {\n updateDynamicRam(\"getCurrentAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTypeAndNameFromActionId(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.action);\n },\n getActionTime: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionTimeNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionEstimatedSuccessChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionEstimatedSuccessChance\"));\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type = \"\", name = \"\", level) {\n updateDynamicRam(\"getActionRepGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank;\n },\n getActionCountRemaining: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCountRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionMaxLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCurrentLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type = \"\", name = \"\", autoLevel = true) {\n updateDynamicRam(\"setActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type = \"\", name = \"\", level = 1) {\n updateDynamicRam(\"setActionLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n\n if (level < 1 || level > action.maxLevel) {\n throw makeRuntimeErrorMsg(\"bladeburner.setActionLevel\", `Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n\n action.level = level;\n },\n getRank: function () {\n updateDynamicRam(\"getRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.rank;\n },\n getSkillPoints: function () {\n updateDynamicRam(\"getSkillPoints\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName = \"\") {\n updateDynamicRam(\"getSkillLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName = \"\") {\n updateDynamicRam(\"getSkillUpgradeCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName) {\n updateDynamicRam(\"upgradeSkill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type = \"\", name = \"\", size) {\n updateDynamicRam(\"setTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName) {\n updateDynamicRam(\"getCityEstimatedPopulation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].popEst;\n },\n getCityEstimatedCommunities: function (cityName) {\n updateDynamicRam(\"getCityEstimatedCommunities\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName) {\n updateDynamicRam(\"getCityChaos\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].chaos;\n },\n getCity: function () {\n updateDynamicRam(\"getCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city;\n },\n switchCity: function (cityName) {\n updateDynamicRam(\"switchCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city = cityName;\n },\n getStamina: function () {\n updateDynamicRam(\"getStamina\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n return [_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.stamina, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function () {\n updateDynamicRam(\"joinBladeburnerFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function () {\n updateDynamicRam(\"joinBladeburnerDivision\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerDivision\"));\n checkBladeburnerAccess(\"joinBladeburnerDivision\", true);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][7] > 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 8) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"]) {\n return true; // Already member\n } else if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility >= 100) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"](_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"joinBladeburnerDivision\", \"You have been accepted into the Bladeburner division\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n\n return true;\n } else {\n workerScript.log(\"joinBladeburnerDivision\", \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.storedCycles / 5);\n }\n },\n // End Bladeburner\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName, divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewIndustry */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, industryName, divisionName);\n },\n expandCity: function (divisionName, cityName) {\n const division = getDivision(divisionName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewCity */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__[/* CorporationUnlockUpgrades */ \"a\"]).find(upgrade => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UnlockUpgrade */ \"x\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n levelUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__[/* CorporationUpgrades */ \"a\"]).find(upgrade => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* LevelUpgrade */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n issueDividends: function (percent) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* IssueDividends */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, percent);\n },\n sellMaterial: function (divisionName, cityName, materialName, amt, price) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellMaterial */ \"o\"])(material, amt, price);\n },\n sellProduct: function (divisionName, cityName, productName, amt, price, all) {\n const product = getProduct(divisionName, productName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellProduct */ \"p\"])(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName, productName) {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName, cityName, enabled) {\n const warehouse = getWarehouse(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetSmartSupply */ \"u\"])(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function () {},\n buyMaterial: function (divisionName, cityName, materialName, amt) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyMaterial */ \"c\"])(material, amt);\n },\n employees: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n return office.employees.map(e => Object.assign({}, e));\n },\n assignJob: function (divisionName, cityName, employeeName, job) {\n const employee = getEmployee(divisionName, cityName, employeeName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* AssignJob */ \"a\"])(employee, job);\n },\n hireEmployee: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName, cityName, size) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeOfficeSize */ \"y\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, size);\n },\n throwParty: function (divisionName, cityName, costPerEmployee) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ThrowParty */ \"w\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* PurchaseWarehouse */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeWarehouse */ \"z\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyCoffee */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* HireAdVert */ \"f\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (divisionName, cityName, productName, designInvest, marketingInvest) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* MakeProduct */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName, researchName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* Research */ \"n\"])(getDivision(divisionName), researchName);\n },\n exportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ExportMaterial */ \"e\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* CancelExportMaterial */ \"d\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA1 */ \"q\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA2 */ \"r\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA1 */ \"s\"])(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA2 */ \"t\"])(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName) {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName, cityName) {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName, cityName) {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName, cityName, materialName) {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName, productName) {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName, cityName, employeeName) {\n return getEmployee(divisionName, cityName, employeeName);\n }\n },\n // End Corporation API\n // Coding Contract API\n codingcontract: {\n attempt: function (answer, fn, ip = workerScript.serverIp, {\n returnReward\n } = {}) {\n updateDynamicRam(\"attempt\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn); // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n\n if (Object(_utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__[/* is2DArray */ \"a\"])(answer)) {\n let answerComponents = [];\n\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const serv = safeGetServer(ip, \"codingcontract.attempt\");\n\n if (contract.isSolution(answer)) {\n const reward = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainCodingContractReward(contract.reward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. ${contract.getMaxNumTries() - contract.tries} attempts remaining.`);\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getContractType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\n const data = contract.getData();\n\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getDescription\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getNumTriesRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n }\n },\n // End coding contracts\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: function () {\n updateDynamicRam(\"getNumSleeves\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length;\n },\n setToShockRecovery: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToShockRecovery\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].shockRecovery(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToSynchronize: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToSynchronize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].synchronize(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToCommitCrime: function (sleeveNumber = 0, crimeName = \"\") {\n updateDynamicRam(\"setToCommitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].commitCrime(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], crimeName);\n },\n setToUniversityCourse: function (sleeveNumber = 0, universityName = \"\", className = \"\") {\n updateDynamicRam(\"setToUniversityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].takeUniversityCourse(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], universityName, className);\n },\n travel: function (sleeveNumber = 0, cityName = \"\") {\n updateDynamicRam(\"travel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].travel(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], cityName);\n },\n setToCompanyWork: function (sleeveNumber = 0, companyName = \"\") {\n updateDynamicRam(\"setToCompanyWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber); // Cannot work at the same company that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Company && other.currentTaskLocation === companyName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForCompany(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], companyName);\n },\n setToFactionWork: function (sleeveNumber = 0, factionName = \"\", workType = \"\") {\n updateDynamicRam(\"setToFactionWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber); // Cannot work at the same faction that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Faction && other.currentTaskLocation === factionName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForFaction(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], factionName, workType);\n },\n setToGymWorkout: function (sleeveNumber = 0, gymName = \"\", stat = \"\") {\n updateDynamicRam(\"setToGymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workoutAtGym(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], gymName, stat);\n },\n getSleeveStats: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking_skill: sl.hacking_skill,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma\n };\n },\n getTask: function (sleeveNumber = 0) {\n updateDynamicRam(\"getTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n task: _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"][sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__[/* FactionWorkType */ \"a\"][sl.factionWorkType]\n };\n },\n getInformation: function (sleeveNumber = 0) {\n updateDynamicRam(\"getInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: sl.max_hp,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n // There's no reason not to give that infomation here as well. Worst case scenario it isn't used.\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult\n },\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money\n },\n workRepGain: sl.getRepGain(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])\n };\n },\n getSleeveAugmentations: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n const augs = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations[i].name);\n }\n\n return augs;\n },\n getSleevePurchasableAugs: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleevePurchasableAugs\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n const purchasableAugs = Object(_PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__[/* findSleevePurchasableAugs */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const augs = [];\n\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (sleeveNumber = 0, augName = \"\") {\n updateDynamicRam(\"purchaseSleeveAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug) {\n throw makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].tryBuyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], aug);\n }\n },\n // End sleeve\n formulas: {\n basic: {\n calculateSkill: function (exp, mult = 1) {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateSkill */ \"b\"])(exp, mult);\n },\n calculateExp: function (skill, mult = 1) {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateExp */ \"a\"])(skill, mult);\n },\n hackChance: function (server, player) {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, player);\n },\n hackExp: function (server, player) {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, player);\n },\n hackPercent: function (server, player) {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n },\n growPercent: function (server, threads, player, cores = 1) {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return Object(_Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__[/* calculateServerGrowth */ \"a\"])(server, threads, player, cores);\n },\n hackTime: function (server, player) {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, player);\n },\n growTime: function (server, player) {\n checkFormulasAccess(\"basic.growTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, player);\n },\n weakenTime: function (server, player) {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, player);\n }\n },\n hacknetNodes: {\n moneyGainRate: function (level, ram, cores, mult = 1) {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateMoneyGainRate */ \"c\"])(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateLevelUpgradeCost */ \"b\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateCoreUpgradeCost */ \"a\"])(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n, mult) {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateNodeCost */ \"d\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetNodeConstants */ \"a\"]);\n }\n },\n hacknetServers: {\n hashGainRate: function (level, ramUsed, maxRam, cores, mult = 1) {\n checkFormulasAccess(\"hacknetServers.hashGainRate\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateHashGainRate */ \"c\"])(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateLevelUpgradeCost */ \"d\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCoreUpgradeCost */ \"b\"])(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache, extraCache = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCacheUpgradeCost */ \"a\"])(startingCache, extraCache, costMult);\n },\n hashUpgradeCost: function (upgName, level) {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgrade(upgName);\n\n if (!upg) {\n throw makeRuntimeErrorMsg(\"formulas.hacknetServers.calculateHashUpgradeCost\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return upg.getCost(level);\n },\n hacknetServerCost: function (n, mult) {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateServerCost */ \"f\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"]);\n }\n }\n },\n // end formulas\n heart: {\n // Easter egg function\n break: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].karma;\n }\n },\n exploit: function () {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].UndocumentedFunctionCall);\n },\n bypass: function (doc) {\n // reset both fields first\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined; // set one to true and check that it affected the other.\n\n document.completely_unused_field = true;\n\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].Bypass);\n }\n\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined;\n },\n flags: function (data) {\n data = toNative(data); // We always want the help flag.\n\n const args = {};\n\n for (const d of data) {\n let t = String;\n\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n\n const ret = arg__WEBPACK_IMPORTED_MODULE_1__(args, {\n argv: workerScript.args\n });\n\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n\n return ret;\n }\n };\n\n function getFunctionNames(obj) {\n const functionNames = [];\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map(a => [a, true]));\n return functions;\n} // End NetscriptFunction()\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/NetscriptFunctions.js?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return NetscriptFunctions; });\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! sprintf-js */ 472);\n/* harmony import */ var sprintf_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(sprintf_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! arg */ 437);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Netscript/RamCostGenerator */ 11);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Prestige */ 275);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Crime/CrimeHelpers */ 354);\n/* harmony import */ var _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Bladeburner/Bladeburner */ 171);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./Company/CompanyPosition */ 276);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Company/CompanyPositions */ 63);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Constants */ 5);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Corporation/Actions */ 53);\n/* harmony import */ var _Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Corporation/data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./Corporation/data/CorporationUpgrades */ 342);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Hacking */ 81);\n/* harmony import */ var _Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./Server/formulas/grow */ 434);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./Gang/Gang */ 394);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./Gang/AllGangs */ 59);\n/* harmony import */ var _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./Gang/GangMemberTasks */ 177);\n/* harmony import */ var _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./Gang/GangMemberUpgrades */ 154);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./Faction/FactionHelpers */ 91);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./Faction/FactionWorkTypeEnum */ 126);\n/* harmony import */ var _Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Hacking/netscriptCanHack */ 407);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetNodes */ 198);\n/* harmony import */ var _Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./Hacknet/formulas/HacknetServers */ 180);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./Hacknet/data/Constants */ 32);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./Locations/data/LocationNames */ 9);\n/* harmony import */ var _Terminal__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./Terminal */ 88);\n/* harmony import */ var _PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./PersonObjects/formulas/skill */ 199);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./Message/Message */ 97);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./Missions */ 119);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./Player */ 2);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./Programs/Programs */ 54);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./Script/Script */ 286);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./Script/ScriptHelpers */ 169);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./Server/AllServers */ 29);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./Script/RunningScript */ 277);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./Server/ServerPurchases */ 173);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./StockMarket/PlayerInfluencing */ 395);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./StockMarket/StockMarketHelpers */ 156);\n/* harmony import */ var _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./StockMarket/data/OrderTypes */ 80);\n/* harmony import */ var _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./StockMarket/data/PositionTypes */ 52);\n/* harmony import */ var _StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./StockMarket/data/StockSymbols */ 68);\n/* harmony import */ var _StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./StockMarket/StockMarketCosts */ 220);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./TextFile */ 197);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./NetscriptWorker */ 125);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./Netscript/WorkerScripts */ 153);\n/* harmony import */ var _NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./NetscriptEvaluator */ 109);\n/* harmony import */ var _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./JSInterpreter */ 440);\n/* harmony import */ var _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./NetscriptPort */ 264);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./PersonObjects/Sleeve/SleeveHelpers */ 442);\n/* harmony import */ var _Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./Exploits/Exploit.ts */ 223);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./ui/numeralFormat */ 3);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./utils/helpers/is2DArray */ 706);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../utils/LogBox */ 214);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../utils/uiHelpers/createPopup */ 436);\n/* harmony import */ var _utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../utils/uiHelpers/removeElementById */ 212);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst defaultInterpreter = new _JSInterpreter__WEBPACK_IMPORTED_MODULE_66__[/* Interpreter */ \"a\"](\"\", () => undefined); // the acorn interpreter has a bug where it doesn't convert arrays correctly.\n// so we have to more or less copy it here.\n\nfunction toNative(pseudoObj) {\n if (pseudoObj == null) return null;\n\n if (!pseudoObj.hasOwnProperty(\"properties\") || !pseudoObj.hasOwnProperty(\"getter\") || !pseudoObj.hasOwnProperty(\"setter\") || !pseudoObj.hasOwnProperty(\"proto\")) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj;\n\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\n\n for (let i = 0; i < length; i++) {\n if (defaultInterpreter.hasProperty(pseudoObj, i)) {\n nativeObj[i] = toNative(defaultInterpreter.getProperty(pseudoObj, i));\n }\n }\n } else {\n // Object.\n nativeObj = {};\n\n for (var key in pseudoObj.properties) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n\n return nativeObj;\n}\n\nfunction NetscriptFunctions(workerScript) {\n const updateDynamicRam = function (fnName, ramCost) {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n\n workerScript.dynamicLoadedFns[fnName] = true;\n let threads = workerScript.scriptRef.threads;\n\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.serverIp}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost * threads;\n\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${fnName}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Dynamic RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(workerScript.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const scan = eval('ns.scan');\n\n * Using map access to do the same\n   const scan = ns['scan'];\n\n * Saving script in the improper order.\n   Increase the cost of an imported script, save it, then run the\n   parent. To fix this just re-open & save every script in order\n   from most imported to least imported (parent script).\n\n Sorry :(`);\n }\n };\n /**\n * Gets the Server for a specific hostname/ip, throwing an error\n * if the server doesn't exist.\n * @param {string} ip - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {Server} The specified Server\n */\n\n\n const safeGetServer = function (ip, callingFnName = \"\") {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid IP/hostname: ${ip}`);\n }\n\n return server;\n };\n /**\n * Searches for and returns the RunningScript object for the specified script.\n * If the 'fn' argument is not specified, this returns the current RunningScript.\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {RunningScript}\n * Running script identified by the parameters, or null if no such script\n * exists, or the current running script if the first argument 'fn'\n * is not specified.\n */\n\n\n const getRunningScript = function (fn, ip, callingFnName, scriptArgs) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` + `This is probably a bug. Please report to game developer`);\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (ip == null) {\n ip = workerScript.serverIp;\n }\n\n const server = safeGetServer(ip, callingFnName);\n return Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(fn, scriptArgs, server);\n } // If no arguments are specified, return the current RunningScript\n\n\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid, callingFnName) {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const name of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"])) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][name];\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScriptByPid */ \"b\"])(pid, server);\n if (runningScript) return runningScript;\n }\n\n return null;\n };\n /**\n * Helper function for getting the error log message when the user specifies\n * a nonexistent running script\n * @param {string} fn - Filename of script\n * @param {string} ip - Hostname/ip of the server on which the script resides\n * @param {any[]} scriptArgs - Running script's arguments\n * @returns {string} Error message to print to logs\n */\n\n\n const getCannotFindRunningScriptErrorMessage = function (fn, ip, scriptArgs) {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${ip} with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`;\n };\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n\n\n const checkTixApiAccess = function (callingFn = \"\") {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess) {\n throw makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n /**\n * Gets a stock, given its symbol. Throws an error if the symbol is invalid\n * @param {string} symbol - Stock's symbol\n * @returns {Stock} stock object\n */\n\n\n const getStockFromSymbol = function (symbol, callingFn = \"\") {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n /**\n * Used to fail a function if the function's target is a Hacknet Server.\n * This is used for functions that should run on normal Servers, but not Hacknet Servers\n * @param {Server} server - Target server\n * @param {string} callingFn - Name of calling function. For logging purposes\n * @returns {boolean} True if the server is a Hacknet Server, false otherwise\n */\n\n\n const failOnHacknetServer = function (server, callingFn = \"\") {\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_34__[/* HacknetServer */ \"a\"]) {\n workerScript.log(callingFn, `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n }; // Utility function to get Hacknet Node object\n\n\n const getHacknetNode = function (i, callingFn = \"\") {\n if (isNaN(i)) {\n throw makeRuntimeErrorMsg(callingFn, \"Invalid index specified for Hacknet Node: \" + i);\n }\n\n if (i < 0 || i >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length) {\n throw makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i]];\n\n if (hserver == null) {\n throw makeRuntimeErrorMsg(callingFn, `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`);\n }\n\n return hserver;\n } else {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes[i];\n }\n };\n\n const makeRuntimeErrorMsg = function (caller, msg) {\n const stack = new Error().stack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n\n for (const stackline of stack) {\n let filename;\n\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n\n if (!filename) continue;\n\n function parseChromeStackline(line) {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n\n if (lineMatch && funcMatch) {\n return {\n line: lineMatch[1],\n func: funcMatch[1]\n };\n }\n\n return null;\n }\n\n let call = {\n line: \"-1\",\n func: \"unknown\"\n };\n const chromeCall = parseChromeStackline(stackline);\n\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line) {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return {\n line: lineMatch[1],\n func: line.slice(0, lio)\n };\n }\n\n return null;\n }\n\n let firefoxCall = parseFirefoxStackline(stackline);\n\n if (firefoxCall) {\n call = firefoxCall;\n }\n\n userstack.push(`${filename}:L${call.line}@${call.func}`);\n }\n\n workerScript.log(caller, msg);\n let rejectMsg = `${caller}: ${msg}`;\n if (userstack.length !== 0) rejectMsg += `

Stack:
${userstack.join(\"
\")}`;\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* makeRuntimeRejectMsg */ \"b\"])(workerScript, rejectMsg);\n };\n\n const checkFormulasAccess = function (func, n) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][n] < 1 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== n) {\n let extra = \"\";\n\n if (n !== 5) {\n extra = ` and Source-File ${n}-1`;\n }\n\n throw makeRuntimeErrorMsg(`formulas.${func}`, `Requires Source-File 5-1${extra} to run.`);\n }\n };\n\n const checkSingularityAccess = function (func, n) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 4) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][4] < n) {\n throw makeRuntimeErrorMsg(func, `This singularity function requires Source-File 4-${n} to run.`);\n }\n }\n };\n\n const checkBladeburnerAccess = function (func, skipjoined = false) {\n const apiAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.some(a => {\n return a.n === 7;\n });\n\n if (!apiAccess) {\n const apiDenied = `You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n\n if (!skipjoined) {\n const bladeburnerAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"];\n\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func, city) {\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities.hasOwnProperty(city)) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const checkSleeveAPIAccess = function (func) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 10 && !_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][10]) {\n throw makeRuntimeErrorMsg(`sleeve.${func}`, \"You do not currently have access to the Sleeve API. This is either because you are not in BitNode-10 or because you do not have Source-File 10\");\n }\n };\n\n const checkSleeveNumber = function (func, sleeveNumber) {\n if (sleeveNumber >= _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, msg);\n throw makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getCodingContract = function (func, ip, fn) {\n const server = safeGetServer(ip, func);\n const contract = server.getContract(fn);\n\n if (contract == null) {\n throw makeRuntimeErrorMsg(`codingcontract.${func}`, `Cannot find contract '${fn}' on server '${ip}'`);\n }\n\n return contract;\n };\n\n const checkGangApiAccess = function (func) {\n const hasAccess = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_22__[/* Gang */ \"a\"];\n\n if (!hasAccess) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func, name) {\n for (const member of _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members) if (member.name === name) return member;\n\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func, name) {\n const task = _Gang_GangMemberTasks__WEBPACK_IMPORTED_MODULE_24__[/* GangMemberTasks */ \"a\"][name];\n\n if (!task) {\n throw makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n const getBladeburnerActionObject = function (func, type, name) {\n const actionId = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionIdFromTypeAndName(type, name);\n\n if (!actionId) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n const actionObj = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionObject(actionId);\n\n if (!actionObj) {\n throw makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n const getCompany = function (func, name) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][name];\n\n if (company == null || !(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n throw makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n\n return company;\n };\n\n const getFaction = function (func, name) {\n if (!Object(_Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* factionExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n };\n\n const getAugmentation = function (func, name) {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* augmentationExists */ \"b\"])(name)) {\n throw makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][name];\n };\n\n function getDivision(divisionName) {\n const division = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation.divisions.find(div => div.name === divisionName);\n if (division === undefined) throw new Error(`No division named '${divisionName}'`);\n return division;\n }\n\n function getOffice(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.offices)) throw new Error(`Invalid city name '${cityName}'`);\n const office = division.offices[cityName];\n if (office === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return office;\n }\n\n function getWarehouse(divisionName, cityName) {\n const division = getDivision(divisionName);\n if (!(cityName in division.warehouses)) throw new Error(`Invalid city name '${cityName}'`);\n const warehouse = division.warehouses[cityName];\n if (warehouse === 0) throw new Error(`${division.name} has not expanded to '${cityName}'`);\n return warehouse;\n }\n\n function getMaterial(divisionName, cityName, materialName) {\n const warehouse = getWarehouse(divisionName, cityName);\n const material = warehouse.materials[materialName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName, productName) {\n const division = getDivision(divisionName);\n const product = division.products[productName];\n if (product === undefined) throw new Error(`Invalid product name: '${productName}'`);\n return product;\n }\n\n function getEmployee(divisionName, cityName, employeeName) {\n const office = getOffice(divisionName, cityName);\n const employee = office.employees.find(e => e.name === employeeName);\n if (employee === undefined) throw new Error(`Invalid employee name: '${employeeName}'`);\n return employee;\n }\n\n const runAfterReset = function (cbScript = null) {\n //Run a script after reset\n if (cbScript && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(cbScript)) {\n const home = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (const script of home.scripts) {\n if (script.filename === cbScript) {\n const ramUsage = script.ramUsage;\n const ramAvailable = home.maxRam - home.ramUsed;\n\n if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n\n const runningScriptObj = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_47__[/* RunningScript */ \"a\"](script, []); // No args\n\n runningScriptObj.threads = 1; // Only 1 thread\n\n Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* startWorkerScript */ \"e\"])(runningScriptObj, home);\n }\n }\n }\n };\n\n const hack = function (ip, manual, {\n threads: requestedThreads,\n stock\n } = {}) {\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"hack\", requestedThreads);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hack\", `Invalid IP/hostname: ${ip}.`);\n } // Calculate the hacking time\n\n\n var hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // This is in seconds\n // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg);\n }\n\n workerScript.log(\"hack\", `Executing ${ip} in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(hackingTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n var hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n var rand = Math.random();\n var expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n var expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n let maxThreadNeeded = Math.ceil(1 / percentHacked * (server.moneyAvailable / server.moneyMax));\n\n if (isNaN(maxThreadNeeded)) {\n // Server has a 'max money' of 0 (probably). We'll set this to an arbitrarily large value\n maxThreadNeeded = 1e6;\n }\n\n let moneyDrained = Math.floor(server.moneyAvailable * percentHacked) * threads; // Over-the-top safety checks\n\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n\n server.moneyAvailable -= moneyDrained;\n\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoneyGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainMoney(moneyGained);\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug += moneyGained;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].recordMoneySource(moneyGained, \"hacking\");\n workerScript.scriptRef.recordHack(server.ip, moneyGained, threads);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnSuccess);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\"hack\", `Successfully hacked '${server.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerHack */ \"c\"])(server, moneyGained);\n }\n\n if (manual) {\n server.backdoorInstalled = true;\n }\n\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\"hack\", `Failed to hack '${server.hostname}'. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args) {\n let out = \"\";\n\n for (let arg of args) {\n arg = toNative(arg);\n\n if (typeof arg === \"object\") {\n out += JSON.stringify(arg);\n continue;\n }\n\n out += `${arg}`;\n }\n\n return out;\n };\n\n const functions = {\n hacknet: {\n numNodes: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknetNodes.length;\n },\n maxNumNodes: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"].MaxServers;\n }\n\n return Infinity;\n },\n purchaseNode: function () {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHacknet */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getPurchaseNodeCost: function () {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetServer */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n } else {\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* getCostOfNextHacknetNode */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n },\n getNodeStats: function (i) {\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const res = {\n name: hasUpgraded ? node.hostname : node.name,\n level: node.level,\n ram: hasUpgraded ? node.maxRam : node.ram,\n cores: node.cores,\n production: hasUpgraded ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: hasUpgraded ? node.totalHashesGenerated : node.totalMoneyGenerated\n };\n\n if (hasUpgraded) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseLevelUpgrade */ \"n\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeRam: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseRamUpgrade */ \"o\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCore: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCoreUpgrade */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n },\n upgradeCache: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n const res = Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseCacheUpgrade */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], node, n);\n\n if (res) {\n Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* updateHashManagerCapacity */ \"p\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n }\n\n return res;\n },\n getLevelUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (i, n) {\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (i, n) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n const node = getHacknetNode(i, \"upgradeCache\");\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.hashes;\n },\n hashCapacity: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return 0;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.capacity;\n },\n hashCost: function (upgName) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return Infinity;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (upgName, upgTarget) {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* purchaseHashUpgrade */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], upgName, upgTarget);\n },\n getHashUpgradeLevel: function (upgName) {\n const level = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.upgrades[upgName];\n\n if (level === undefined) {\n throw makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return level;\n },\n getStudyMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getStudyMult();\n },\n getTrainingMult: function () {\n if (!Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_30__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n return false;\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getTrainingMult();\n }\n },\n sprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"sprintf\"],\n vsprintf: sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"],\n scan: function (ip = workerScript.serverIp, hostnames = true) {\n updateDynamicRam(\"scan\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scan\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scan\", `Invalid IP/hostname: ${ip}.`);\n }\n\n var out = [];\n\n for (var i = 0; i < server.serversOnNetwork.length; i++) {\n var entry;\n\n if (hostnames) {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).hostname;\n } else {\n entry = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i).ip;\n }\n\n if (entry == null) {\n continue;\n }\n\n out.push(entry);\n }\n\n workerScript.log(\"scan\", `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"hack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hack\"));\n return hack(ip, false, {\n threads: requestedThreads,\n stock: stock\n });\n },\n hackAnalyzeThreads: function (ip, hackAmount) {\n updateDynamicRam(\"hackAnalyzeThreads\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzeThreads\")); // Check argument validity\n\n const server = safeGetServer(ip, \"hackAnalyzeThreads\");\n\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(workerScript, `Invalid growth argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`);\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n }\n\n const percentHacked = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyzePercent: function (ip) {\n updateDynamicRam(\"hackAnalyzePercent\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackAnalyzePercent\"));\n const server = safeGetServer(ip, \"hackAnalyzePercent\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * 100;\n },\n hackChance: function (ip) {\n updateDynamicRam(\"hackChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hackChance\"));\n const server = safeGetServer(ip, \"hackChance\");\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n sleep: function (time) {\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n\n workerScript.log(\"sleep\", `Sleeping for ${time} milliseconds`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(time, workerScript).then(function () {\n return Promise.resolve(true);\n });\n },\n grow: function (ip, {\n threads: requestedThreads,\n stock\n } = {}) {\n updateDynamicRam(\"grow\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"grow\"));\n const threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"grow\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"grow\", `Invalid IP/hostname: ${ip}.`);\n }\n\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp); // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanGrow */ \"a\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg);\n }\n\n var growTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"grow\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(growTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(growTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n server.moneyAvailable += 1 * threads; // It can be grown even if it has no money\n\n Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* processSingleServerGrowth */ \"g\"])(server, threads, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.ip, threads);\n var expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\"grow\", `Available money on '${server.hostname}' grown by ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatPercentage(logGrowPercent, 6)}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)}).`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n\n if (stock) {\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_53__[/* influenceStockThroughServerGrow */ \"b\"])(server, moneyAfter - moneyBefore);\n }\n\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (ip, growth) {\n updateDynamicRam(\"growthAnalyze\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"growthAnalyze\")); // Check argument validity\n\n const server = safeGetServer(ip, \"growthAnalyze\");\n\n if (typeof growth !== \"number\" || isNaN(growth) || growth < 1 || !isFinite(growth)) {\n throw makeRuntimeErrorMsg(\"growthAnalyze\", `Invalid argument: growth must be numeric and >= 1, is ${growth}.`);\n }\n\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* numCycleForGrowth */ \"e\"])(server, Number(growth), _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n weaken: function (ip, {\n threads: requestedThreads\n } = {}) {\n updateDynamicRam(\"weaken\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"weaken\"));\n var threads = Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* resolveNetscriptRequestedThreads */ \"d\"])(workerScript, \"weaken\", requestedThreads);\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"weaken\", `Invalid IP/hostname: ${ip}`);\n } // No root access or skill level too low\n\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanWeaken */ \"c\"])(server);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg);\n }\n\n const weakenTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"weaken\", `Executing on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(weakenTime * 1000, true)} (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(weakenTime * 1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) return Promise.reject(workerScript);\n const host = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.ip, threads);\n const expGain = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) * threads;\n workerScript.log(\"weaken\", `'${server.hostname}' security level weakened to ${server.hackDifficulty}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatExp(expGain)} hacking exp (t=${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatThreads(threads)})`);\n workerScript.scriptRef.onlineExpGained += expGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainHackingExp(expGain);\n return Promise.resolve(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ServerWeakenAmount * threads);\n });\n },\n print: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n\n workerScript.print(argsToString(arguments));\n },\n tprint: function () {\n if (arguments.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(`${workerScript.scriptRef.filename}: ${argsToString(arguments)}`);\n },\n tprintf: function (format, ...args) {\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].print(Object(sprintf_js__WEBPACK_IMPORTED_MODULE_0__[\"vsprintf\"])(format, args));\n },\n clearLog: function () {\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (fn) {\n if (fn === \"ALL\") {\n for (fn in possibleLogs) {\n workerScript.disableLogs[fn] = true;\n }\n\n workerScript.log(\"disableLog\", `Disabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"disableLog\", `Invalid argument: ${fn}.`);\n } else {\n workerScript.disableLogs[fn] = true;\n workerScript.log(\"disableLog\", `Disabled logging for ${fn}`);\n }\n },\n enableLog: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (fn) {\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n\n return workerScript.disableLogs[fn] ? false : true;\n },\n getScriptLogs: function (fn, ip, ...scriptArgs) {\n const runningScriptObj = getRunningScript(fn, ip, \"getScriptLogs\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return \"\";\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n let runningScriptObj;\n\n if (arguments.length === 0) {\n runningScriptObj = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScriptObj = getRunningScriptByPid(fn, \"tail\");\n } else {\n runningScriptObj = getRunningScript(fn, ip, \"tail\", scriptArgs);\n }\n\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", getCannotFindRunningScriptErrorMessage(fn, ip, scriptArgs));\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_75__[/* logBoxCreate */ \"a\"])(runningScriptObj);\n },\n nuke: function (ip) {\n updateDynamicRam(\"nuke\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"nuke\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"nuke\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", `Already have root access to '${server.hostname}'.`);\n } else {\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n }\n\n return true;\n },\n brutessh: function (ip) {\n updateDynamicRam(\"brutessh\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"brutessh\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"brutessh\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\n }\n\n if (!server.sshPortOpen) {\n workerScript.log(\"brutessh\", `Executed BruteSSH.exe on '${server.hostname}' to open SSH port (22).`);\n server.sshPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"brutessh\", `SSH Port (22) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n ftpcrack: function (ip) {\n updateDynamicRam(\"ftpcrack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ftpcrack\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\n }\n\n if (!server.ftpPortOpen) {\n workerScript.log(\"ftpcrack\", `Executed FTPCrack.exe on '${server.hostname}' to open FTP port (21).`);\n server.ftpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"ftpcrack\", `FTP Port (21) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n relaysmtp: function (ip) {\n updateDynamicRam(\"relaysmtp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"relaysmtp\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", `Invalid IP/hostname: ${ip}.`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\n }\n\n if (!server.smtpPortOpen) {\n workerScript.log(\"relaysmtp\", `Executed relaySMTP.exe on '${server.hostname}' to open SMTP port (25).`);\n server.smtpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"relaysmtp\", `SMTP Port (25) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n httpworm: function (ip) {\n updateDynamicRam(\"httpworm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"httpworm\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"httpworm\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\n }\n\n if (!server.httpPortOpen) {\n workerScript.log(\"httpworm\", `Executed HTTPWorm.exe on '${server.hostname}' to open HTTP port (80).`);\n server.httpPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"httpworm\", `HTTP Port (80) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n sqlinject: function (ip) {\n updateDynamicRam(\"sqlinject\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sqlinject\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"sqlinject\", `Invalid IP/hostname: ${ip}`);\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"].SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\n }\n\n if (!server.sqlPortOpen) {\n workerScript.log(\"sqlinject\", `Executed SQLInject.exe on '${server.hostname}' to open SQL port (1433).`);\n server.sqlPortOpen = true;\n ++server.openPortCount;\n } else {\n workerScript.log(\"sqlinject\", `SQL Port (1433) already opened on '${server.hostname}'.`);\n }\n\n return true;\n },\n run: function (scriptname, threads = 1) {\n updateDynamicRam(\"run\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"run\"));\n\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"run\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n },\n exec: function (scriptname, ip, threads = 1) {\n updateDynamicRam(\"exec\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"exec\"));\n\n if (scriptname === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 3; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid IP/hostname: ${ip}`);\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"exec\", server, scriptname, argsForNewScript, workerScript, threads);\n },\n spawn: function (scriptname, threads) {\n updateDynamicRam(\"spawn\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"spawn\"));\n\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n\n var argsForNewScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForNewScript.push(arguments[i]);\n }\n\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* runScriptFromScript */ \"d\"])(\"spawn\", scriptServer, scriptname, argsForNewScript, workerScript, threads);\n }, spawnDelay * 1e3);\n workerScript.log(\"spawn\", `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"spawn\", \"Exiting...\");\n }\n },\n kill: function (filename, ip, ...scriptArgs) {\n updateDynamicRam(\"kill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"kill\"));\n let res;\n const killByPid = typeof filename === \"number\";\n\n if (killByPid) {\n // Kill by pid\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(filename);\n } else {\n // Kill by filename/ip\n if (filename === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(ip);\n const runningScriptObj = getRunningScript(filename, ip, \"kill\", scriptArgs);\n\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", getCannotFindRunningScriptErrorMessage(filename, ip, scriptArgs));\n return false;\n }\n\n res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(runningScriptObj, server.ip);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `Killing '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}.`);\n }\n\n return true;\n } else {\n if (killByPid) {\n workerScript.log(\"kill\", `No script with PID ${filename}`);\n } else {\n workerScript.log(\"kill\", `No such script '${filename}' on '${ip}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(scriptArgs)}`);\n }\n\n return false;\n }\n },\n killall: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"killall\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"killall\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"killall\", `Invalid IP/hostname: ${ip}`);\n }\n\n const scriptsRunning = server.runningScripts.length > 0;\n\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_3__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n workerScript.log(\"killall\", `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`);\n return scriptsRunning;\n },\n exit: function () {\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n if (Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript)) {\n workerScript.log(\"exit\", \"Exiting...\");\n } else {\n workerScript.log(\"exit\", \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: function (scriptname, ip1, ip2) {\n updateDynamicRam(\"scp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scp\"));\n\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n var res = false;\n scriptname.forEach(function (script) {\n if (NetscriptFunctions(workerScript).scp(script, ip1, ip2)) {\n res = true;\n }\n });\n return res;\n } // Invalid file type\n\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n } // Invalid file name\n\n\n if (!scriptname.endsWith(\".lit\") && !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for .script, .lit, and .txt files\");\n }\n\n var destServer, currServ;\n\n if (ip2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || ip1 === undefined || ip2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip2);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip2}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n } else if (ip1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || ip1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n destServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip1);\n\n if (destServer == null) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid IP/hostname: ${ip1}`);\n }\n\n currServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\"scp\", \"Could not find server ip for this script. This is a bug. Report to dev.\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n } // Scp for lit files\n\n\n if (scriptname.endsWith(\".lit\")) {\n var found = false;\n\n for (var i = 0; i < currServ.messages.length; ++i) {\n if (!(currServ.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && currServ.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true; // Already exists\n }\n }\n\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for text files\n\n\n if (scriptname.endsWith(\".txt\")) {\n var found = false,\n txtFile;\n\n for (var i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n found = true;\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n }\n\n for (var i = 0; i < destServer.textFiles.length; ++i) {\n if (destServer.textFiles[i].fn === scriptname) {\n // Overwrite\n destServer.textFiles[i].text = txtFile.text;\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n }\n }\n\n var newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_61__[/* TextFile */ \"a\"](txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n } // Scp for script files\n\n\n let sourceScript = null;\n\n for (let i = 0; i < currServ.scripts.length; ++i) {\n if (scriptname == currServ.scripts[i].filename) {\n sourceScript = currServ.scripts[i];\n break;\n }\n }\n\n if (sourceScript == null) {\n workerScript.log(\"scp\", `File '${scriptname}' does not exist.`);\n return false;\n } // Overwrite script if it already exists\n\n\n for (let i = 0; i < destServer.scripts.length; ++i) {\n if (scriptname == destServer.scripts[i].filename) {\n workerScript.log(\"scp\", `WARNING: File '${scriptname}' overwritten on '${destServer.hostname}'`);\n const oldScript = destServer.scripts[i]; // If it's the exact same file don't actually perform the\n // copy to avoid recompiling uselessly. Players tend to scp\n // liberally.\n\n if (oldScript.code === sourceScript.code) return true;\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return true;\n }\n } // Create new script if it does not already exist\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.ip;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", `File '${scriptname}' copied over to '${destServer.hostname}'.`);\n return true;\n },\n ls: function (ip, grep) {\n updateDynamicRam(\"ls\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ls\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(ip/hostname, [grep filter])\");\n }\n\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ls\", `Invalid IP/hostname: ${ip}`);\n } // Get the grep filter, if one exists\n\n\n let filter = false;\n\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\n\n for (let i = 0; i < server.programs.length; i++) {\n if (filter) {\n if (server.programs[i].includes(filter)) {\n allFiles.push(server.programs[i]);\n }\n } else {\n allFiles.push(server.programs[i]);\n }\n }\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filter) {\n if (server.scripts[i].filename.includes(filter)) {\n allFiles.push(server.scripts[i].filename);\n }\n } else {\n allFiles.push(server.scripts[i].filename);\n }\n }\n\n for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n if (server.messages[i].filename.includes(filter)) {\n allFiles.push(server.messages[i].filename);\n }\n } else if (server.messages[i].includes(filter)) {\n allFiles.push(server.messages[i]);\n }\n } else {\n if (server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) {\n allFiles.push(server.messages[i].filename);\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n }\n\n for (var i = 0; i < server.textFiles.length; i++) {\n if (filter) {\n if (server.textFiles[i].fn.includes(filter)) {\n allFiles.push(server.textFiles[i].fn);\n }\n } else {\n allFiles.push(server.textFiles[i].fn);\n }\n }\n\n for (var i = 0; i < server.contracts.length; ++i) {\n if (filter) {\n if (server.contracts[i].fn.includes(filter)) {\n allFiles.push(server.contracts[i].fn);\n }\n } else {\n allFiles.push(server.contracts[i].fn);\n }\n } // Sort the files alphabetically then print each\n\n\n allFiles.sort();\n return allFiles;\n },\n ps: function (ip = workerScript.serverIp) {\n updateDynamicRam(\"ps\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"ps\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"ps\", `Invalid IP/hostname: ${ip}`);\n }\n\n const processes = [];\n\n for (const i in server.runningScripts) {\n const script = server.runningScripts[i];\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid\n });\n }\n\n return processes;\n },\n hasRootAccess: function (ip) {\n updateDynamicRam(\"hasRootAccess\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hasRootAccess\"));\n\n if (ip === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", `Invalid IP/hostname: ${ip}`);\n }\n\n return server.hasAdminRights;\n },\n getIp: function () {\n updateDynamicRam(\"getIp\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getIp\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getIp\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.ip;\n },\n getHostname: function () {\n updateDynamicRam(\"getHostname\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHostname\"));\n var scriptServer = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(workerScript, \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return scriptServer.hostname;\n },\n getHackingLevel: function () {\n updateDynamicRam(\"getHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingLevel\"));\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].updateSkillLevels();\n workerScript.log(\"getHackingLevel\", `returned ${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill;\n },\n getHackingMultipliers: function () {\n updateDynamicRam(\"getHackingMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackingMultipliers\"));\n return {\n chance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n speed: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n growth: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult\n };\n },\n getHacknetMultipliers: function () {\n updateDynamicRam(\"getHacknetMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHacknetMultipliers\"));\n return {\n production: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n purchaseCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n ramCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n coreCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n levelCost: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult\n };\n },\n getBitNodeMultipliers: function () {\n updateDynamicRam(\"getBitNodeMultipliers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getBitNodeMultipliers\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n\n let copy = Object.assign({}, _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"]);\n return copy;\n },\n getServer: function (ip) {\n updateDynamicRam(\"getServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServer\"));\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][5] <= 0 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getServer\", \"Requires Source-File 5 to run.\");\n }\n\n const server = safeGetServer(ip, \"getServer\");\n const copy = Object.assign({}, server); // These fields should be hidden.\n\n copy.contracts = undefined;\n copy.messages = undefined;\n copy.runningScripts = undefined;\n copy.scripts = undefined;\n copy.textFiles = undefined;\n copy.programs = undefined;\n copy.serversOnNetwork = undefined;\n return copy;\n },\n getServerMoneyAvailable: function (ip) {\n updateDynamicRam(\"getServerMoneyAvailable\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMoneyAvailable\"));\n const server = safeGetServer(ip, \"getServerMoneyAvailable\");\n\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\"getServerMoneyAvailable\", `returned player's money: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber())}`);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber();\n }\n\n workerScript.log(\"getServerMoneyAvailable\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyAvailable)} for '${server.hostname}'`);\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.hackDifficulty, 3)} for '${server.hostname}'`);\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerBaseSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerBaseSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerBaseSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerBaseSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.baseDifficulty, 3)} for '${server.hostname}'`);\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (ip) {\n updateDynamicRam(\"getServerMinSecurityLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMinSecurityLevel\"));\n const server = safeGetServer(ip, \"getServerMinSecurityLevel\");\n\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerMinSecurityLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatServerSecurity(server.minDifficulty, 3)} for ${server.hostname}`);\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (ip) {\n updateDynamicRam(\"getServerRequiredHackingLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRequiredHackingLevel\"));\n const server = safeGetServer(ip, \"getServerRequiredHackingLevel\");\n\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n\n workerScript.log(\"getServerRequiredHackingLevel\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatSkill(server.requiredHackingSkill, 0)} for '${server.hostname}'`);\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (ip) {\n updateDynamicRam(\"getServerMaxMoney\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxMoney\"));\n const server = safeGetServer(ip, \"getServerMaxMoney\");\n\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n\n workerScript.log(\"getServerMaxMoney\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(server.moneyMax)} for '${server.hostname}'`);\n return server.moneyMax;\n },\n getServerGrowth: function (ip) {\n updateDynamicRam(\"getServerGrowth\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerGrowth\"));\n const server = safeGetServer(ip, \"getServerGrowth\");\n\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n\n workerScript.log(\"getServerGrowth\", `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (ip) {\n updateDynamicRam(\"getServerNumPortsRequired\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerNumPortsRequired\"));\n const server = safeGetServer(ip, \"getServerNumPortsRequired\");\n\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n\n workerScript.log(\"getServerNumPortsRequired\", `returned ${server.numOpenPortsRequired} for '${server.hostname}'`);\n return server.numOpenPortsRequired;\n },\n getServerRam: function (ip) {\n updateDynamicRam(\"getServerRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerRam\"));\n const server = safeGetServer(ip, \"getServerRam\");\n workerScript.log(\"getServerRam\", `returned [${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}, ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}]`);\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (ip) {\n updateDynamicRam(\"getServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerMaxRam\"));\n const server = safeGetServer(ip, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.maxRam, 2)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (ip) {\n updateDynamicRam(\"getServerUsedRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getServerUsedRam\"));\n const server = safeGetServer(ip, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", `returned ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatRAM(server.ramUsed, 2)}`);\n return server.ramUsed;\n },\n serverExists: function (ip) {\n updateDynamicRam(\"serverExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"serverExists\"));\n return Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip) !== null;\n },\n fileExists: function (filename, ip = workerScript.serverIp) {\n updateDynamicRam(\"fileExists\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"fileExists\"));\n\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"fileExists\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n\n for (var i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n for (var i = 0; i < server.messages.length; ++i) {\n if (!(server.messages[i] instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_39__[/* Message */ \"a\"]) && filename.toLowerCase() === server.messages[i]) {\n return true;\n }\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(filename, server);\n\n if (txtFile != null) {\n return true;\n }\n\n return false;\n },\n isRunning: function (fn, ip = workerScript.serverIp, ...scriptArgs) {\n updateDynamicRam(\"isRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isRunning\"));\n\n if (fn === undefined || ip === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, ip, \"isRunning\", scriptArgs) != null;\n }\n },\n getStockSymbols: function () {\n updateDynamicRam(\"getStockSymbols\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSymbols\"));\n checkTixApiAccess(\"getStockSymbols\");\n return Object.values(_StockMarket_data_StockSymbols__WEBPACK_IMPORTED_MODULE_58__[/* StockSymbols */ \"a\"]);\n },\n getStockPrice: function (symbol) {\n updateDynamicRam(\"getStockPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPrice\"));\n checkTixApiAccess(\"getStockPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockPrice\");\n return stock.price;\n },\n getStockAskPrice: function (symbol) {\n updateDynamicRam(\"getStockAskPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockAskPrice\"));\n checkTixApiAccess(\"getStockAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockAskPrice\");\n return stock.getAskPrice();\n },\n getStockBidPrice: function (symbol) {\n updateDynamicRam(\"getStockBidPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockBidPrice\"));\n checkTixApiAccess(\"getStockBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getStockBidPrice\");\n return stock.getBidPrice();\n },\n getStockPosition: function (symbol) {\n updateDynamicRam(\"getStockPosition\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPosition\"));\n checkTixApiAccess(\"getStockPosition\");\n var stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* SymbolToStockMap */ \"b\"][symbol];\n\n if (stock == null) {\n throw makeRuntimeErrorMsg(\"getStockPosition\", `Invalid stock symbol: ${symbol}`);\n }\n\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getStockMaxShares: function (symbol) {\n updateDynamicRam(\"getStockMaxShares\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockMaxShares\"));\n checkTixApiAccess(\"getStockMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getStockMaxShares\");\n return stock.maxShares;\n },\n getStockPurchaseCost: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockPurchaseCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockPurchaseCost\"));\n checkTixApiAccess(\"getStockPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getStockPurchaseCost\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return Infinity;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getBuyTransactionCost */ \"b\"])(stock, shares, pos);\n\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getStockSaleGain: function (symbol, shares, posType) {\n updateDynamicRam(\"getStockSaleGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockSaleGain\"));\n checkTixApiAccess(\"getStockSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getStockSaleGain\");\n shares = Math.round(shares);\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n\n if (sanitizedPosType.includes(\"l\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n return 0;\n }\n\n const res = Object(_StockMarket_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_55__[/* getSellTransactionGain */ \"c\"])(stock, shares, pos);\n\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buyStock: function (symbol, shares) {\n updateDynamicRam(\"buyStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"buyStock\"));\n checkTixApiAccess(\"buyStock\");\n const stock = getStockFromSymbol(symbol, \"buyStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* buyStock */ \"a\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellStock: function (symbol, shares) {\n updateDynamicRam(\"sellStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellStock\"));\n checkTixApiAccess(\"sellStock\");\n const stock = getStockFromSymbol(symbol, \"sellStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellStock */ \"c\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n shortStock: function (symbol, shares) {\n updateDynamicRam(\"shortStock\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"shortStock\"));\n checkTixApiAccess(\"shortStock\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"], \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"shortStock\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* shortStock */ \"d\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n sellShort: function (symbol, shares) {\n updateDynamicRam(\"sellShort\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sellShort\"));\n checkTixApiAccess(\"sellShort\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 1) {\n throw makeRuntimeErrorMsg(\"sellShort\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"sellShort\");\n const res = Object(_StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_52__[/* sellShort */ \"b\"])(stock, shares, workerScript, {});\n return res ? stock.price : 0;\n },\n placeOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"placeOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"placeOrder\"));\n checkTixApiAccess(\"placeOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"placeOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFromSymbol(symbol, \"placeOrder\");\n let orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* placeOrder */ \"j\"])(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (symbol, shares, price, type, pos) {\n updateDynamicRam(\"cancelOrder\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"cancelOrder\"));\n checkTixApiAccess(\"cancelOrder\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\");\n }\n }\n\n const stock = getStockFrom(symbol, \"cancelOrder\");\n\n if (isNaN(shares) || isNaN(price)) {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`);\n }\n\n var orderType, orderPos;\n ltype = type.toLowerCase();\n\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = _StockMarket_data_OrderTypes__WEBPACK_IMPORTED_MODULE_56__[/* OrderTypes */ \"a\"].StopSell;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n lpos = pos.toLowerCase();\n\n if (lpos.includes(\"l\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = _StockMarket_data_PositionTypes__WEBPACK_IMPORTED_MODULE_57__[/* PositionTypes */ \"a\"].Short;\n } else {\n throw makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n\n var params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos\n };\n return Object(_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* cancelOrder */ \"c\"])(params, workerScript);\n },\n getOrders: function () {\n updateDynamicRam(\"getOrders\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN !== 8) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][8] <= 2) {\n throw makeRuntimeErrorMsg(workerScript, \"You must either be in BitNode-8 or have Source-File 8 Level 3.\");\n }\n }\n\n const orders = {};\n const stockMarketOrders = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_54__[/* StockMarket */ \"a\"][\"Orders\"];\n\n for (let symbol in stockMarketOrders) {\n const orderBook = stockMarketOrders[symbol];\n\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\n\n for (let i = 0; i < orderBook.length; ++i) {\n orders[symbol].push({\n shares: orderBook[i].shares,\n price: orderBook[i].price,\n type: orderBook[i].type,\n position: orderBook[i].pos\n });\n }\n }\n }\n\n return orders;\n },\n getStockVolatility: function (symbol) {\n updateDynamicRam(\"getStockVolatility\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockVolatility\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockVolatility\");\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getStockForecast: function (symbol) {\n updateDynamicRam(\"getStockForecast\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStockForecast\"));\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n throw makeRuntimeErrorMsg(\"getStockForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n\n const stock = getStockFromSymbol(symbol, \"getStockForecast\");\n var forecast = 50;\n stock.b ? forecast += stock.otlkMag : forecast -= stock.otlkMag;\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function () {\n updateDynamicRam(\"purchase4SMarketData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData) {\n workerScript.log(\"purchase4SMarketData\", \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])())) {\n workerScript.log(\"purchase4SMarketData\", \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4SDataCost */ \"a\"])());\n workerScript.log(\"purchase4SMarketData\", \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function () {\n updateDynamicRam(\"purchase4SMarketDataTixApi\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Not enough money to purchase 4S Market Data TIX API\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(Object(_StockMarket_StockMarketCosts__WEBPACK_IMPORTED_MODULE_59__[/* getStockMarket4STixApiCost */ \"b\"])());\n workerScript.log(\"purchase4SMarketDataTixApi\", \"Purchased 4S Market Data TIX API\");\n return true;\n },\n getPurchasedServerLimit: function () {\n updateDynamicRam(\"getPurchasedServerLimit\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerLimit\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])();\n },\n getPurchasedServerMaxRam: function () {\n updateDynamicRam(\"getPurchasedServerMaxRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerMaxRam\"));\n return Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerMaxRam */ \"c\"])();\n },\n getPurchasedServerCost: function (ram) {\n updateDynamicRam(\"getPurchasedServerCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServerCost\"));\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (hostname, ram) {\n updateDynamicRam(\"purchaseServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length >= Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()) {\n workerScript.log(\"purchaseServer\", `You have reached the maximum limit of ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerLimit */ \"b\"])()} servers. You cannot purchase any more.`);\n return \"\";\n }\n\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_49__[/* getPurchaseServerCost */ \"a\"])(ram);\n\n if (cost === Infinity) {\n workerScript.log(\"purchaseServer\", `Invalid argument: ram='${ram}'`);\n return \"\";\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"purchaseServer\", `Not enough money to purchase server. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return \"\";\n }\n\n var newServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(newServ);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.push(newServ.ip);\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.ip);\n newServ.serversOnNetwork.push(homeComputer.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n workerScript.log(\"purchaseServer\", `Purchased new server with hostname '${newServ.hostname}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return newServ.hostname;\n },\n deleteServer: function (hostname) {\n updateDynamicRam(\"deleteServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"deleteServer\"));\n var hostnameStr = String(hostname);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* GetServerByHostname */ \"a\"])(hostnameStr);\n\n if (server == null) {\n workerScript.log(\"deleteServer\", `Invalid argument: hostname='${hostnameStr}'`);\n return false;\n }\n\n if (!server.purchasedByPlayer || server.hostname === \"home\") {\n workerScript.log(\"deleteServer\", \"Cannot delete non-purchased server.\");\n return false;\n }\n\n var ip = server.ip; // Can't delete server you're currently connected to\n\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", \"You are currently connected to the server you are trying to delete.\");\n return false;\n } // A server cannot delete itself\n\n\n if (ip === workerScript.serverIp) {\n workerScript.log(\"deleteServer\", \"Cannot delete the server this script is running on.\");\n return false;\n } // Delete all scripts running on server\n\n\n if (server.runningScripts.length > 0) {\n workerScript.log(\"deleteServer\", `Cannot delete server '${server.hostname}' because it still has scripts running.`);\n return false;\n } // Delete from player's purchasedServers array\n\n\n var found = false;\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.length; ++i) {\n if (ip == _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers[i]) {\n found = true;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\"deleteServer\", `Could not identify server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n } // Delete from all servers\n\n\n delete _Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AllServers */ \"b\"][ip]; // Delete from home computer\n\n found = false;\n var homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n for (var i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (ip == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", `Deleted server '${hostnameStr}`);\n return true;\n }\n } // Wasn't found on home computer\n\n\n workerScript.log(\"deleteServer\", `Could not find server ${server.hostname} as a purchased server. This is a bug. Report to dev.`);\n return false;\n },\n getPurchasedServers: function (hostname = true) {\n updateDynamicRam(\"getPurchasedServers\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPurchasedServers\"));\n var res = [];\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].purchasedServers.forEach(function (ip) {\n if (hostname) {\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getPurchasedServers\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n res.push(server.hostname);\n } else {\n res.push(ip);\n }\n });\n return res;\n },\n write: function (port, data = \"\", mode = \"a\") {\n updateDynamicRam(\"write\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"write\"));\n\n if (!isNaN(port)) {\n // Write to port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"write\", `Trying to write to invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"write\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.write(data);\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Write to script or text file\n let fn = port;\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* isValidFilePath */ \"g\"])(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_60__[/* removeLeadingSlash */ \"h\"])(fn);\n } // Coerce 'data' to be a string\n\n\n try {\n data = String(data);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n // Create a new script\n script = new _Script_Script__WEBPACK_IMPORTED_MODULE_43__[/* Script */ \"a\"](fn, data, server.ip, server.scripts);\n server.scripts.push(script);\n return true;\n }\n\n mode === \"w\" ? script.code = data : script.code += data;\n script.updateRamUsage(server.scripts);\n script.markUpdated();\n } else {\n // Write to text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile == null) {\n txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* createTextFile */ \"b\"])(fn, data, server);\n return true;\n }\n\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n\n return true;\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWrite: function (port, data = \"\") {\n updateDynamicRam(\"tryWrite\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"tryWrite\"));\n\n if (!isNaN(port)) {\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.tryWrite(data);\n } else {\n throw makeRuntimeErrorMsg(\"tryWrite\", `Invalid argument: ${port}`);\n }\n },\n read: function (port) {\n updateDynamicRam(\"read\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"read\"));\n\n if (!isNaN(port)) {\n // Read from port\n // Port 1-10\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"read\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"read\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.read();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Read from script or text file\n let fn = port;\n let server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(fn)) {\n // Read from script\n let script = workerScript.getScriptOnServer(fn);\n\n if (script == null) {\n return \"\";\n }\n\n return script.code;\n } else {\n // Read from text file\n let txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile !== null) {\n return txtFile.text;\n } else {\n return \"\";\n }\n }\n } else {\n throw makeRuntimeErrorMsg(\"read\", `Invalid argument: ${port}`);\n }\n },\n peek: function (port) {\n updateDynamicRam(\"peek\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"peek\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"peek\", `Invalid argument. Must be a port number between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}, is ${port}`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"peek\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.peek();\n },\n clear: function (port) {\n updateDynamicRam(\"clear\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"clear\"));\n\n if (!isNaN(port)) {\n // Clear port\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"clear\", `Trying to clear invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"clear\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port.clear();\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(port)) {\n // Clear text file\n var fn = port;\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(workerScript.serverIp);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n\n var txtFile = Object(_TextFile__WEBPACK_IMPORTED_MODULE_61__[/* getTextFile */ \"c\"])(fn, server);\n\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${port}`);\n }\n\n return 0;\n },\n getPortHandle: function (port) {\n updateDynamicRam(\"getPortHandle\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPortHandle\"));\n\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port} Must be an integer between 1 and ${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts}.`);\n }\n\n port = Math.round(port);\n\n if (port < 1 || port > _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Invalid port: ${port}. Only ports 1-${_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].NumNetscriptPorts} are valid.`);\n }\n\n var port = _NetscriptWorker__WEBPACK_IMPORTED_MODULE_62__[/* NetscriptPorts */ \"a\"][port - 1];\n\n if (port == null || !(port instanceof _NetscriptPort__WEBPACK_IMPORTED_MODULE_67__[/* NetscriptPort */ \"a\"])) {\n throw makeRuntimeErrorMsg(\"getPortHandle\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n\n return port;\n },\n rm: function (fn, ip) {\n updateDynamicRam(\"rm\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"rm\"));\n\n if (ip == null || ip === \"\") {\n ip = workerScript.serverIp;\n }\n\n const s = safeGetServer(ip, \"rm\");\n const status = s.removeFile(fn);\n\n if (!status.res) {\n workerScript.log(\"rm\", status.msg);\n }\n\n return status.res;\n },\n scriptRunning: function (scriptname, ip) {\n updateDynamicRam(\"scriptRunning\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptRunning\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptRunning\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n\n return false;\n },\n scriptKill: function (scriptname, ip) {\n updateDynamicRam(\"scriptKill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"scriptKill\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"scriptKill\", `Invalid IP/hostname: ${ip}`);\n }\n\n var suc = false;\n\n for (var i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip);\n suc = true;\n }\n }\n\n return suc;\n },\n getScriptName: function () {\n return workerScript.name;\n },\n getScriptRam: function (scriptname, ip = workerScript.serverIp) {\n updateDynamicRam(\"getScriptRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptRam\"));\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptRam\", `Invalid IP/hostname: ${ip}`);\n }\n\n for (var i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n\n return 0;\n },\n getRunningScript: function (fn, ip) {\n updateDynamicRam(\"getRunningScript\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getRunningScript\"));\n let runningScript;\n\n if (arguments.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n const scriptArgs = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n scriptArgs.push(arguments[i]);\n }\n\n runningScript = getRunningScript(fn, ip, \"getRunningScript\", scriptArgs);\n }\n\n if (runningScript === null) return null;\n return {\n args: runningScript.args.slice(),\n filename: runningScript.filename,\n logs: runningScript.logs.slice(),\n offlineExpGained: runningScript.offlineExpGained,\n offlineMoneyMade: runningScript.offlineMoneyMade,\n offlineRunningTime: runningScript.offlineRunningTime,\n onlineExpGained: runningScript.onlineExpGained,\n onlineMoneyMade: runningScript.onlineMoneyMade,\n onlineRunningTime: runningScript.onlineRunningTime,\n pid: runningScript.pid,\n ramUsage: runningScript.ramUsage,\n server: runningScript.server,\n threads: runningScript.threads\n };\n },\n getHackTime: function (ip) {\n updateDynamicRam(\"getHackTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getHackTime\"));\n const server = safeGetServer(ip, \"getHackTime\");\n\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getGrowTime: function (ip) {\n updateDynamicRam(\"getGrowTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getGrowTime\"));\n const server = safeGetServer(ip, \"getGrowTime\");\n\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getWeakenTime: function (ip) {\n updateDynamicRam(\"getWeakenTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getWeakenTime\"));\n const server = safeGetServer(ip, \"getWeakenTime\");\n\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]); // Returns seconds\n },\n getScriptIncome: function (scriptname, ip) {\n updateDynamicRam(\"getScriptIncome\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptIncome\"));\n\n if (arguments.length === 0) {\n var res = []; // First element is total income of all currently running scripts\n\n let total = 0;\n\n for (const script of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n\n res.push(total); // Second element is total income you've earned from scripts since you installed Augs\n\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].scriptProdSinceLastAug / (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptIncome\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptIncome\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname, ip) {\n updateDynamicRam(\"getScriptExpGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getScriptExpGain\"));\n\n if (arguments.length === 0) {\n var total = 0;\n\n for (const ws of _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_64__[/* workerScripts */ \"a\"].values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n\n return total;\n } else {\n // Get income for a particular script\n var server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(ip);\n\n if (server == null) {\n throw makeRuntimeErrorMsg(\"getScriptExpGain\", `Invalid IP/hostnamed: ${ip}`);\n }\n\n var argsForScript = [];\n\n for (var i = 2; i < arguments.length; ++i) {\n argsForScript.push(arguments[i]);\n }\n\n var runningScriptObj = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_44__[/* findRunningScript */ \"a\"])(scriptname, argsForScript, server);\n\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptExpGain\", `No such script '${scriptname}' on '${server.hostname}' with args: ${Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_76__[/* arrayToString */ \"a\"])(argsForScript)}`);\n return -1;\n }\n\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (n, format) {\n if (isNaN(n) || isNaN(parseFloat(n)) || typeof format !== \"string\") {\n return \"\";\n }\n\n return _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].format(parseFloat(n), format);\n },\n tFormat: function (milliseconds, milliPrecision = false) {\n return Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function () {\n updateDynamicRam(\"getTimeSinceLastAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getTimeSinceLastAug\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug;\n },\n prompt: function (txt) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(txt)) {\n txt = JSON.stringify(txt);\n } // The id for this popup will consist of the first 20 characters of the prompt string..\n // Thats hopefully good enough to be unique\n\n\n const popupId = `prompt-popup-${txt.slice(0, 20)}`;\n const textElement = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"p\", {\n innerHTML: txt\n });\n return new Promise(function (resolve) {\n const yesBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"Yes\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(true);\n }\n });\n const noBtn = Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_78__[/* createElement */ \"a\"])(\"button\", {\n class: \"popup-box-button\",\n innerText: \"No\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeElementById__WEBPACK_IMPORTED_MODULE_80__[/* removeElementById */ \"a\"])(popupId);\n resolve(false);\n }\n });\n Object(_utils_uiHelpers_createPopup__WEBPACK_IMPORTED_MODULE_79__[/* createPopup */ \"a\"])(popupId, [textElement, yesBtn, noBtn]);\n });\n },\n wget: async function (url, target, ip = workerScript.serverIp) {\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n workerScript.log(\"wget\", `Invalid target file: '${target}'. Must be a script or text file.`);\n return Promise.resolve(false);\n }\n\n var s = safeGetServer(ip, \"wget\");\n return new Promise(function (resolve) {\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_45__[/* isScriptFilename */ \"a\"])(target)) {\n res = s.writeToScriptFile(target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n workerScript.log(\"wget\", \"Failed.\");\n return resolve(false);\n }\n\n if (res.overwritten) {\n workerScript.log(\"wget\", `Successfully retrieved content and overwrote '${target}' on '${ip}'`);\n return resolve(true);\n }\n\n workerScript.log(\"wget\", `Successfully retrieved content to new file '${target}' on '${ip}'`);\n return resolve(true);\n }, \"text\").fail(function (e) {\n workerScript.log(\"wget\", JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function () {\n updateDynamicRam(\"getFavorToDonate\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFavorToDonate\"));\n return Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n },\n\n /* Singularity Functions */\n universityCourse: function (universityName, className) {\n updateDynamicRam(\"universityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"universityCourse\"));\n checkSingularityAccess(\"universityCourse\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"universityCourse\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"universityCourse\", txt);\n }\n\n var costMult, expMult;\n\n switch (universityName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Summit University' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'Rothman University' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"universityCourse\", \"You cannot study at 'ZB Institute of Technology' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n var task;\n\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience;\n break;\n\n case \"Data Structures\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassDataStructures;\n break;\n\n case \"Networks\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassNetworks;\n break;\n\n case \"Algorithms\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassAlgorithms;\n break;\n\n case \"Management\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassManagement;\n break;\n\n case \"Leadership\".toLowerCase():\n task = _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassLeadership;\n break;\n\n default:\n workerScript.log(\"universityCourse\", `Invalid class name: ${className}.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, task);\n workerScript.log(\"universityCourse\", `Started ${task} at ${universityName}`);\n return true;\n },\n gymWorkout: function (gymName, stat) {\n updateDynamicRam(\"gymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gymWorkout\"));\n checkSingularityAccess(\"gymWorkout\", 1);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"gymWorkout\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"gymWorkout\", txt);\n }\n\n var costMult, expMult;\n\n switch (gymName.toLowerCase()) {\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Crush Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Snap Fitness' because you are not in 'Aevum'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Iron Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Powerhouse Gym' because you are not in 'Sector-12'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n\n case _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym.toLowerCase():\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city != _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven) {\n workerScript.log(\"gymWorkout\", \"You cannot workout at 'Millenium Fitness Gym' because you are not in 'Volhaven'.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid gym name: ${gymName}. gymWorkout() failed`);\n return false;\n }\n\n switch (stat.toLowerCase()) {\n case \"strength\".toLowerCase():\n case \"str\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n break;\n\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n break;\n\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n break;\n\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startClass(costMult, expMult, _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n break;\n\n default:\n workerScript.log(\"gymWorkout\", `Invalid stat: ${stat}.`);\n return false;\n }\n\n workerScript.log(\"gymWorkout\", `Started training ${stat} at ${gymName}`);\n return true;\n },\n travelToCity: function (cityname) {\n updateDynamicRam(\"travelToCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"travelToCity\"));\n checkSingularityAccess(\"travelToCity\", 1);\n\n switch (cityname) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Aevum:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Chongqing:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Sector12:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].NewTokyo:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Ishima:\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_35__[/* CityName */ \"a\"].Volhaven:\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost)) {\n throw makeRuntimeErrorMsg(\"travelToCity\", \"Not enough money to travel.\");\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TravelCost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city = cityname;\n workerScript.log(\"travelToCity\", `Traveled to ${cityname}`);\n return true;\n\n default:\n workerScript.log(\"travelToCity\", `Invalid city name: '${cityname}'.`);\n return false;\n }\n },\n purchaseTor: function () {\n updateDynamicRam(\"purchaseTor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseTor\"));\n checkSingularityAccess(\"purchaseTor\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] != null) {\n workerScript.log(\"purchaseTor\", \"You already have a TOR router!\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n workerScript.log(\"purchaseTor\", \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].TorRouterCost);\n var darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_46__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"purchaseTor\", \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (programName) {\n updateDynamicRam(\"purchaseProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseProgram\"));\n checkSingularityAccess(\"purchaseProgram\", 1);\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"][\"Darkweb Server\"] == null) {\n workerScript.log(\"purchaseProgram\", \"You do not have the TOR router.\");\n return false;\n }\n\n programName = programName.toLowerCase();\n let item = null;\n\n for (const key in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"]) {\n const i = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_16__[/* DarkWebItems */ \"a\"][key];\n\n if (i.program.toLowerCase() == programName) {\n item = i;\n }\n }\n\n if (item == null) {\n workerScript.log(\"purchaseProgram\", `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(item.price)) {\n workerScript.log(\"purchaseProgram\", `Not enough money to purchase '${item.program}'. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(item.price)}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", `You already have the '${item.program}' program`);\n return true;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(item.price);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().programs.push(item.program);\n workerScript.log(\"purchaseProgram\", `You have purchased the '${item.program}' program. The new program can be found on your home computer.`);\n return true;\n },\n getCurrentServer: function () {\n updateDynamicRam(\"getCurrentServer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCurrentServer\"));\n checkSingularityAccess(\"getCurrentServer\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().hostname;\n },\n connect: function (hostname) {\n updateDynamicRam(\"connect\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"connect\"));\n checkSingularityAccess(\"connect\", 1);\n\n if (!hostname) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n let target = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServer */ \"b\"])(hostname);\n\n if (target == null) {\n throw makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n return;\n }\n\n if (hostname === \"home\") {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer().ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_48__[/* getServerOnNetwork */ \"c\"])(server, i);\n\n if (other.ip == hostname || other.hostname == hostname) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = false;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentServer = target.ip;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer().isConnectedTo = true;\n _Terminal__WEBPACK_IMPORTED_MODULE_37__[/* Terminal */ \"a\"].setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function () {\n updateDynamicRam(\"manualHack\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"manualHack\"));\n checkSingularityAccess(\"manualHack\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n return hack(server.hostname, true);\n },\n installBackdoor: function () {\n updateDynamicRam(\"installBackdoor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installBackdoor\"));\n checkSingularityAccess(\"installBackdoor\", 1);\n const server = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getCurrentServer();\n const installTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]) / 4 * 1000; // No root access or skill level too low\n\n const canHack = Object(_Hacking_netscriptCanHack__WEBPACK_IMPORTED_MODULE_29__[/* netscriptCanHack */ \"b\"])(server, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg);\n }\n\n workerScript.log(\"installBackdoor\", `Installing backdoor on '${server.hostname}' in ${Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_74__[/* convertTimeMsToTimeElapsedString */ \"b\"])(installTime, true)}`);\n return Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_65__[/* netscriptDelay */ \"c\"])(installTime, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n\n workerScript.log(\"installBackdoor\", `Successfully installed backdoor on '${server.hostname}'`);\n server.backdoorInstalled = true;\n return Promise.resolve();\n });\n },\n getStats: function () {\n updateDynamicRam(\"getStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getStats\"));\n checkSingularityAccess(\"getStats\", 1);\n workerScript.log(\"getStats\", `getStats is deprecated, please use getPlayer`);\n return {\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence\n };\n },\n getCharacterInformation: function () {\n updateDynamicRam(\"getCharacterInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCharacterInformation\"));\n checkSingularityAccess(\"getCharacterInformation\", 1);\n workerScript.log(\"getCharacterInformation\", `getCharacterInformation is deprecated, please use getPlayer`);\n return {\n bitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n jobTitles: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n mult: {\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n companyRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n crimeMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crimeSuccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n factionRep: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n hacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n workMoney: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult\n },\n timeWorked: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].timeWorked,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n workHackExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGain: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n hackingExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strengthExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defenseExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agilityExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charismaExp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp\n };\n },\n getPlayer: function () {\n updateDynamicRam(\"getPlayer\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getPlayer\"));\n const data = {\n hacking_skill: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_skill,\n hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hp,\n max_hp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].max_hp,\n strength: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength,\n defense: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense,\n dexterity: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity,\n agility: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility,\n charisma: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma,\n intelligence: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].intelligence,\n hacking_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_chance_mult,\n hacking_speed_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_speed_mult,\n hacking_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_money_mult,\n hacking_grow_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_grow_mult,\n hacking_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp,\n strength_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp,\n defense_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp,\n dexterity_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp,\n agility_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp,\n charisma_exp: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp,\n hacking_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_mult,\n strength_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_mult,\n defense_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_mult,\n dexterity_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_mult,\n agility_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_mult,\n charisma_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_mult,\n hacking_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacking_exp_mult,\n strength_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength_exp_mult,\n defense_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense_exp_mult,\n dexterity_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity_exp_mult,\n agility_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility_exp_mult,\n charisma_exp_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].charisma_exp_mult,\n company_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].company_rep_mult,\n faction_rep_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult,\n numPeopleKilled: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].numPeopleKilled,\n money: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.toNumber(),\n city: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].city,\n location: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location,\n companyName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName,\n crime_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_money_mult,\n crime_success_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crime_success_mult,\n isWorking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking,\n workType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workType,\n currentWorkFactionName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionName,\n currentWorkFactionDescription: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].currentWorkFactionDescription,\n workHackExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGainRate,\n workStrExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGainRate,\n workDefExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGainRate,\n workDexExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGainRate,\n workAgiExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGainRate,\n workChaExpGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGainRate,\n workRepGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGainRate,\n workMoneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGainRate,\n workMoneyLossRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyLossRate,\n workHackExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workHackExpGained,\n workStrExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workStrExpGained,\n workDefExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDefExpGained,\n workDexExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workDexExpGained,\n workAgiExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workAgiExpGained,\n workChaExpGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workChaExpGained,\n workRepGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workRepGained,\n workMoneyGained: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].workMoneyGained,\n createProgramName: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramName,\n createProgramReqLvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].createProgramReqLvl,\n className: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].className,\n crimeType: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].crimeType,\n work_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].work_money_mult,\n hacknet_node_money_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hacknet_node_level_cost_mult,\n hasWseAccount: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasWseAccount,\n hasTixApiAccess: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasTixApiAccess,\n has4SData: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SData,\n has4SDataTixApi: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].has4SDataTixApi,\n bladeburner_max_stamina_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_analysis_mult,\n bladeburner_success_chance_mult: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner_success_chance_mult,\n bitNodeN: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN,\n totalPlaytime: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].totalPlaytime,\n playtimeSinceLastAug: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastAug,\n playtimeSinceLastBitnode: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].playtimeSinceLastBitnode,\n jobs: {},\n factions: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.slice(),\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")\n };\n Object.assign(data.jobs, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs);\n return data;\n },\n hospitalize: function () {\n updateDynamicRam(\"hospitalize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"hospitalize\"));\n checkSingularityAccess(\"hospitalize\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hospitalize();\n },\n isBusy: function () {\n updateDynamicRam(\"isBusy\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"isBusy\"));\n checkSingularityAccess(\"isBusy\", 1);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking || _Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"];\n },\n stopAction: function () {\n updateDynamicRam(\"stopAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"stopAction\"));\n checkSingularityAccess(\"stopAction\", 1);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"stopAction\", txt);\n return true;\n }\n\n return false;\n },\n upgradeHomeRam: function () {\n updateDynamicRam(\"upgradeHomeRam\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"upgradeHomeRam\"));\n checkSingularityAccess(\"upgradeHomeRam\", 2); // Check if we're at max RAM\n\n const homeComputer = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(cost)) {\n workerScript.log(\"upgradeHomeRam\", `You don't have enough money. Need ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(cost)}`);\n return false;\n }\n\n homeComputer.maxRam *= 2;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(cost);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"upgradeHomeRam\", `Purchased additional RAM for home computer! It now has ${homeComputer.maxRam}GB of RAM.`);\n return true;\n },\n getUpgradeHomeRamCost: function () {\n updateDynamicRam(\"getUpgradeHomeRamCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getUpgradeHomeRamCost\"));\n checkSingularityAccess(\"getUpgradeHomeRamCost\", 2);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].getUpgradeHomeRamCost();\n },\n workForCompany: function (companyName) {\n updateDynamicRam(\"workForCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForCompany\"));\n checkSingularityAccess(\"workForCompany\", 2); // Sanitize input\n\n if (companyName == null) {\n companyName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName;\n } // Make sure its a valid company\n\n\n if (companyName == null || companyName === \"\" || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_12__[/* Companies */ \"a\"][companyName] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_11__[/* Company */ \"a\"])) {\n workerScript.log(\"workForCompany\", `Invalid company: '${companyName}'`);\n return false;\n } // Make sure player is actually employed at the comapny\n\n\n if (!Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", `You do not have a job at '${companyName}'`);\n return false;\n } // Cant work while in a mission\n\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForCompany\", \"You are in the middle of a mission.\");\n return false;\n } // Check to make sure company position data is valid\n\n\n const companyPositionName = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_14__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPositionName === \"\" || !(companyPosition instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_13__[/* CompanyPosition */ \"a\"])) {\n workerScript.log(\"workForCompany\", \"You do not have a job\");\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForCompany\", txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWorkPartTime(companyName);\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startWork(companyName);\n }\n\n workerScript.log(\"workForCompany\", `Began working at '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].companyName}' as a '${companyPositionName}'`);\n return true;\n },\n applyToCompany: function (companyName, field) {\n updateDynamicRam(\"applyToCompany\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"applyToCompany\"));\n checkSingularityAccess(\"applyToCompany\", 2);\n getCompany(\"applyToCompany\", companyName);\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].location = companyName;\n var res;\n\n switch (field.toLowerCase()) {\n case \"software\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareJob(true);\n break;\n\n case \"software consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSoftwareConsultantJob(true);\n break;\n\n case \"it\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForItJob(true);\n break;\n\n case \"security engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityEngineerJob(true);\n break;\n\n case \"network engineer\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForNetworkEngineerJob(true);\n break;\n\n case \"business\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessJob(true);\n break;\n\n case \"business consultant\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForBusinessConsultantJob(true);\n break;\n\n case \"security\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForSecurityJob(true);\n break;\n\n case \"agent\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForAgentJob(true);\n break;\n\n case \"employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForEmployeeJob(true);\n break;\n\n case \"part-time employee\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeEmployeeJob(true);\n break;\n\n case \"waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForWaiterJob(true);\n break;\n\n case \"part-time waiter\":\n res = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].applyForPartTimeWaiterJob(true);\n break;\n\n default:\n workerScript.log(\"applyToCompany\", `Invalid job: '${field}'.`);\n return false;\n } // The Player object's applyForJob function can return string with special error messages\n\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res)) {\n workerScript.log(\"applyToCompany\", res);\n return false;\n }\n\n if (res) {\n workerScript.log(\"applyToCompany\", `You were offered a new job at '${companyName}' as a '${_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs[companyName]}'`);\n } else {\n workerScript.log(\"applyToCompany\", `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`);\n }\n\n return res;\n },\n getCompanyRep: function (companyName) {\n updateDynamicRam(\"getCompanyRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyRep\"));\n checkSingularityAccess(\"getCompanyRep\", 2);\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (companyName) {\n updateDynamicRam(\"getCompanyFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavor\"));\n checkSingularityAccess(\"getCompanyFavor\", 2);\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (companyName) {\n updateDynamicRam(\"getCompanyFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCompanyFavorGain\"));\n checkSingularityAccess(\"getCompanyFavorGain\", 2);\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain()[0];\n },\n checkFactionInvitations: function () {\n updateDynamicRam(\"checkFactionInvitations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"checkFactionInvitations\"));\n checkSingularityAccess(\"checkFactionInvitations\", 2); // Make a copy of Player.factionInvitations\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.slice();\n },\n joinFaction: function (name) {\n updateDynamicRam(\"joinFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"joinFaction\"));\n checkSingularityAccess(\"joinFaction\", 2);\n getFaction(\"joinFaction\", name);\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.includes(name)) {\n workerScript.log(\"joinFaction\", `You have not been invited by faction '${name}'`);\n return false;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name];\n Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* joinFaction */ \"d\"])(fac); // Update Faction Invitation list to account for joined + banned factions\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.length; ++i) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i] == name || _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations[i]].isBanned) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factionInvitations.splice(i, 1);\n i--;\n }\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"joinFaction\", `Joined the '${name}' faction.`);\n return true;\n },\n workForFaction: function (name, type) {\n updateDynamicRam(\"workForFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"workForFaction\"));\n checkSingularityAccess(\"workForFaction\", 2);\n getFaction(\"workForFaction\", name); // if the player is in a gang and the target faction is any of the gang faction, fail\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang() && _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][name] !== undefined) {\n workerScript.log(\"workForFaction\", `Faction '${name}' does not offer work at the moment.`);\n return;\n }\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"workForFaction\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(name)) {\n workerScript.log(\"workForFaction\", `You are not a member of '${name}'`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"workForFaction\", txt);\n }\n\n var fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_26__[/* Factions */ \"a\"][name]; // Arrays listing factions that allow each time of work\n\n var hackAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"BitRunners\", \"The Black Hand\", \"NiteSec\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Netburners\", \"Tian Di Hui\", \"CyberSec\"];\n var fdWkAvailable = [\"Illuminati\", \"Daedalus\", \"The Covenant\", \"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"The Black Hand\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Dark Army\", \"The Syndicate\", \"Silhouette\", \"Tetrads\", \"Slum Snakes\"];\n var scWkAvailable = [\"ECorp\", \"MegaCorp\", \"Bachman & Associates\", \"Blade Industries\", \"NWO\", \"Clarke Incorporated\", \"OmniTek Incorporated\", \"Four Sigma\", \"KuaiGong International\", \"Fulcrum Secret Technologies\", \"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\", \"Volhaven\", \"Speakers for the Dead\", \"The Syndicate\", \"Tetrads\", \"Slum Snakes\", \"Tian Di Hui\"];\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!hackAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionHackWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!fdWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionFieldWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out field missions for '${fac.name}'`);\n return true;\n\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!scWkAvailable.includes(fac.name)) {\n workerScript.log(\"workForFaction\", `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startFactionSecurityWork(fac);\n workerScript.log(\"workForFaction\", `Started carrying out security work for '${fac.name}'`);\n return true;\n\n default:\n workerScript.log(\"workForFaction\", `Invalid work type: '${type}`);\n }\n\n return true;\n },\n getFactionRep: function (name) {\n updateDynamicRam(\"getFactionRep\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionRep\"));\n checkSingularityAccess(\"getFactionRep\", 2);\n const faction = getFaction(\"getFactionRep\", name);\n return faction.playerReputation;\n },\n getFactionFavor: function (name) {\n updateDynamicRam(\"getFactionFavor\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavor\"));\n checkSingularityAccess(\"getFactionFavor\", 2);\n const faction = getFaction(\"getFactionFavor\", name);\n return faction.favor;\n },\n getFactionFavorGain: function (name) {\n updateDynamicRam(\"getFactionFavorGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getFactionFavorGain\"));\n checkSingularityAccess(\"getFactionFavorGain\", 2);\n const faction = getFaction(\"getFactionFavorGain\", name);\n return faction.getFavorGain()[0];\n },\n donateToFaction: function (name, amt) {\n updateDynamicRam(\"donateToFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"donateToFaction\"));\n checkSingularityAccess(\"donateToFaction\", 3);\n const faction = getFaction(\"donateToFaction\", name);\n\n if (typeof amt !== \"number\" || amt <= 0) {\n workerScript.log(\"donateToFaction\", `Invalid donation amount: '${amt}'.`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].money.lt(amt)) {\n workerScript.log(\"donateToFaction\", `You do not have enough money to donate ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} to '${name}'`);\n return false;\n }\n\n const repNeededToDonate = Math.round(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\"donateToFaction\", `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`);\n return false;\n }\n\n const repGain = amt / _Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor * _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].faction_rep_mult;\n faction.playerReputation += repGain;\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].loseMoney(amt);\n workerScript.log(\"donateToFaction\", `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatMoney(amt)} donated to '${name}' for ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_71__[/* numeralWrapper */ \"a\"].formatReputation(repGain)} reputation`);\n return true;\n },\n createProgram: function (name) {\n updateDynamicRam(\"createProgram\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"createProgram\"));\n checkSingularityAccess(\"createProgram\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"createProgram\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n var txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"createProgram\", txt);\n }\n\n name = name.toLowerCase();\n let p = null;\n\n for (const key in _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"]) {\n if (_Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key].name.toLowerCase() == name) {\n p = _Programs_Programs__WEBPACK_IMPORTED_MODULE_42__[/* Programs */ \"a\"][key];\n }\n }\n\n if (p == null) {\n workerScript.log(\"createProgram\", `The specified program does not exist: '${name}`);\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasProgram(p.name)) {\n workerScript.log(\"createProgram\", `You already have the '${p.name}' program`);\n return false;\n }\n\n if (!p.create.req(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])) {\n workerScript.log(\"createProgram\", `Hacking level is too low to create '${p.name}' (level ${p.create.level} req)`);\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startCreateProgramWork(p.name, p.create.time, p.create.level);\n workerScript.log(\"createProgram\", `Began creating program: '${name}'`);\n return true;\n },\n commitCrime: function (crimeRoughName) {\n updateDynamicRam(\"commitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"commitCrime\"));\n checkSingularityAccess(\"commitCrime\", 3);\n\n if (_Missions__WEBPACK_IMPORTED_MODULE_40__[/* inMission */ \"c\"]) {\n workerScript.log(\"commitCrime\", \"You are in the middle of a mission.\");\n return;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].isWorking) {\n const txt = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].singularityStopWork();\n workerScript.log(\"commitCrime\", txt);\n } // Set Location to slums\n\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_36__[/* LocationName */ \"a\"].Slums);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n // couldn't find crime\n throw makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n\n workerScript.log(\"commitCrime\", `Attempting to commit ${crime.name}...`);\n return crime.commit(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], 1, {\n workerscript: workerScript\n });\n },\n getCrimeChance: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeChance\"));\n checkSingularityAccess(\"getCrimeChance\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n getCrimeStats: function (crimeRoughName) {\n updateDynamicRam(\"getCrimeStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getCrimeStats\"));\n checkSingularityAccess(\"getCrimeStats\", 3);\n const crime = Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_9__[/* findCrime */ \"b\"])(crimeRoughName.toLowerCase());\n\n if (crime == null) {\n throw makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getOwnedAugmentations: function (purchased = false) {\n updateDynamicRam(\"getOwnedAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedAugmentations\"));\n checkSingularityAccess(\"getOwnedAugmentations\", 3);\n var res = [];\n\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[i].name);\n }\n\n if (purchased) {\n for (var i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++i) {\n res.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[i].name);\n }\n }\n\n return res;\n },\n getOwnedSourceFiles: function () {\n updateDynamicRam(\"getOwnedSourceFiles\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getOwnedSourceFiles\"));\n checkSingularityAccess(\"getOwnedSourceFiles\", 3);\n let res = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles.length; ++i) {\n res.push({\n n: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].n,\n lvl: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sourceFiles[i].lvl\n });\n }\n\n return res;\n },\n getAugmentationsFromFaction: function (facname) {\n updateDynamicRam(\"getAugmentationsFromFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationsFromFaction\"));\n checkSingularityAccess(\"getAugmentationsFromFaction\", 3);\n const faction = getFaction(\"getAugmentationsFromFaction\", facname); // If player has a gang with this faction, return all augmentations.\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(facname)) {\n const res = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n res.push(augName);\n }\n }\n\n return res;\n }\n\n return faction.augmentations.slice();\n },\n getAugmentationCost: function (name) {\n updateDynamicRam(\"getAugmentationCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationCost\"));\n checkSingularityAccess(\"getAugmentationCost\", 3);\n const aug = getAugmentation(\"getAugmentationCost\", name);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (name) {\n updateDynamicRam(\"getAugmentationPrereq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrereq\"));\n checkSingularityAccess(\"getAugmentationPrereq\", 3);\n const aug = getAugmentation(\"getAugmentationPrereq\", name);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (name) {\n updateDynamicRam(\"getAugmentationPrice\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationPrice\"));\n checkSingularityAccess(\"getAugmentationPrice\", 3);\n const aug = getAugmentation(\"getAugmentationPrice\", name);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (name) {\n updateDynamicRam(\"getAugmentationRepReq\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationRepReq\"));\n checkSingularityAccess(\"getAugmentationRepReq\", 3);\n const aug = getAugmentation(\"getAugmentationRepReq\", name);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (name) {\n updateDynamicRam(\"getAugmentationStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"getAugmentationStats\"));\n checkSingularityAccess(\"getAugmentationStats\", 3);\n const aug = getAugmentation(\"getAugmentationStats\", name);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (faction, name) {\n updateDynamicRam(\"purchaseAugmentation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"purchaseAugmentation\"));\n checkSingularityAccess(\"purchaseAugmentation\", 3);\n const fac = getFaction(\"purchaseAugmentation\", faction);\n const aug = getAugmentation(\"purchaseAugmentation\", name);\n let augs = [];\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hasGangWith(faction)) {\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"]) {\n const tempAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!tempAug.isSpecial) {\n augs.push(augName);\n }\n }\n } else {\n augs = fac.augmentations;\n }\n\n if (!augs.includes(name)) {\n workerScript.log(\"purchaseAugmentation\", `Faction '${faction}' does not have the '${name}' augmentation.`);\n return false;\n }\n\n const isNeuroflux = aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_7__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor;\n\n if (!isNeuroflux) {\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n\n for (let j = 0; j < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations.length; ++j) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", `You already have the '${name}' augmentation.`);\n return false;\n }\n }\n }\n\n if (fac.playerReputation < aug.baseRepRequirement) {\n workerScript.log(\"purchaseAugmentation\", `You do not have enough reputation with '${fac.name}'.`);\n return false;\n }\n\n const res = Object(_Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_27__[/* purchaseAugmentation */ \"f\"])(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", res);\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_77__[/* isString */ \"a\"])(res) && res.startsWith(\"You purchased\")) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (cbScript) {\n updateDynamicRam(\"softReset\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"softReset\"));\n checkSingularityAccess(\"softReset\", 3);\n workerScript.log(\"softReset\", \"Soft resetting. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n runAfterReset(cbScript);\n }, 0); // Prevent workerScript from \"finishing execution naturally\"\n\n workerScript.running = false;\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n installAugmentations: function (cbScript) {\n updateDynamicRam(\"installAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"installAugmentations\"));\n checkSingularityAccess(\"installAugmentations\", 3);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", \"You do not have any Augmentations to be installed.\");\n return false;\n }\n\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_15__[/* CONSTANTS */ \"a\"].IntelligenceSingFnBaseExpGain);\n workerScript.log(\"installAugmentations\", \"Installing Augmentations. This will cause this script to be killed\");\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_72__[/* setTimeoutRef */ \"a\"])(() => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_5__[/* installAugmentations */ \"d\"])();\n runAfterReset(cbScript);\n }, 0);\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_63__[/* killWorkerScript */ \"a\"])(workerScript);\n },\n // Gang API\n gang: {\n createGang: function (faction) {\n updateDynamicRam(\"createGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"createGang\")); // this list is copied from Faction/ui/Root.tsx\n\n const GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].canAccessGang() || !GangNames.includes(faction)) return false;\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang()) return false;\n if (!_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].factions.includes(faction)) return false;\n const isHacking = faction === \"NiteSec\" || faction === \"The Black Hand\";\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].startGang(faction, isHacking);\n return true;\n },\n inGang: function () {\n updateDynamicRam(\"inGang\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"inGang\"));\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].inGang();\n },\n getMemberNames: function () {\n updateDynamicRam(\"getMemberNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.members.map(member => member.name);\n },\n getGangInformation: function () {\n updateDynamicRam(\"getGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n return {\n faction: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName,\n isHacking: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.isHackingGang,\n moneyGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.moneyGainRate,\n power: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getPower(),\n respect: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respect,\n respectGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.respectGainRate,\n territory: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getTerritory(),\n territoryClashChance: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryClashChance,\n territoryWarfareEngaged: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged,\n wantedLevel: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wanted,\n wantedLevelGainRate: _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.wantedGainRate\n };\n },\n getOtherGangInformation: function () {\n updateDynamicRam(\"getOtherGangInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy = {};\n\n for (const gang in _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"]) {\n cpy[gang] = Object.assign({}, _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (name) {\n updateDynamicRam(\"getMemberInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const member = getGangMember(\"getMemberInformation\", name);\n return {\n name: member.name,\n task: member.task,\n earnedRespect: member.earnedRespect,\n hack: member.hack,\n str: member.str,\n def: member.def,\n dex: member.dex,\n agi: member.agi,\n cha: member.cha,\n hack_exp: member.hack_exp,\n str_exp: member.str_exp,\n def_exp: member.def_exp,\n dex_exp: member.dex_exp,\n agi_exp: member.agi_exp,\n cha_exp: member.cha_exp,\n hack_mult: member.hack_mult,\n str_mult: member.str_mult,\n def_mult: member.def_mult,\n dex_mult: member.dex_mult,\n agi_mult: member.agi_mult,\n cha_mult: member.cha_mult,\n hack_asc_mult: member.calculateAscensionMult(member.hack_asc_points),\n str_asc_mult: member.calculateAscensionMult(member.str_asc_points),\n def_asc_mult: member.calculateAscensionMult(member.def_asc_points),\n dex_asc_mult: member.calculateAscensionMult(member.dex_asc_points),\n agi_asc_mult: member.calculateAscensionMult(member.agi_asc_points),\n cha_asc_mult: member.calculateAscensionMult(member.cha_asc_points),\n hack_asc_points: member.hack_asc_points,\n str_asc_points: member.str_asc_points,\n def_asc_points: member.def_asc_points,\n dex_asc_points: member.dex_asc_points,\n agi_asc_points: member.agi_asc_points,\n cha_asc_points: member.cha_asc_points,\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice()\n };\n },\n canRecruitMember: function () {\n updateDynamicRam(\"canRecruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.canRecruitMember();\n },\n recruitMember: function (name) {\n updateDynamicRam(\"recruitMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const recruited = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.recruitMember(name);\n\n if (recruited) {\n workerScript.log(\"recruitMember\", `Successfully recruited Gang Member '${name}'`);\n } else {\n workerScript.log(\"recruitMember\", `Failed to recruit Gang Member '${name}'`);\n }\n\n return recruited;\n },\n getTaskNames: function () {\n updateDynamicRam(\"getTaskNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const tasks = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (memberName, taskName) {\n updateDynamicRam(\"setMemberTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const success = member.assignToTask(taskName);\n\n if (success) {\n workerScript.log(\"setMemberTask\", `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`);\n } else {\n workerScript.log(\"setMemberTask\", `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`);\n }\n\n return success;\n },\n getTaskStats: function (taskName) {\n updateDynamicRam(\"getTaskStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getTaskStats\"));\n checkGangApiAccess(\"getTaskStats\");\n const task = getGangTask(\"getTaskStats\", taskName);\n const copy = Object.assign({}, task);\n copy.territory = Object.assign({}, task.territory);\n return copy;\n },\n getEquipmentNames: function () {\n updateDynamicRam(\"getEquipmentNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(_Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"]);\n },\n getEquipmentCost: function (equipName) {\n updateDynamicRam(\"getEquipmentCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg === null) return Infinity;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (equipName) {\n updateDynamicRam(\"getEquipmentType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (equipName) {\n updateDynamicRam(\"getEquipmentStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n\n if (!equipment) {\n throw makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n\n return Object.assign({}, equipment.mults);\n },\n purchaseEquipment: function (memberName, equipName) {\n updateDynamicRam(\"purchaseEquipment\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = _Gang_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_25__[/* GangMemberUpgrades */ \"a\"][equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang);\n\n if (res) {\n workerScript.log(\"purchaseEquipment\", `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\"purchaseEquipment\", `Failed to purchase '${equipName}' for Gang member '${memberName}'`);\n }\n\n return res;\n },\n ascendMember: function (name) {\n updateDynamicRam(\"ascendMember\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const member = getGangMember(\"ascendMember\", name);\n if (!member.canAscend()) return;\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.ascendMember(member, workerScript);\n },\n setTerritoryWarfare: function (engage) {\n updateDynamicRam(\"setTerritoryWarfare\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n\n if (engage) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = true;\n workerScript.log(\"setTerritoryWarfare\", \"Engaging in Gang Territory Warfare\");\n } else {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.territoryWarfareEngaged = false;\n workerScript.log(\"setTerritoryWarfare\", \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (otherGang) {\n updateDynamicRam(\"getChanceToWinClash\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n\n if (_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang] == null) {\n throw makeRuntimeErrorMsg(`gang.${getChanceToWinClash}`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.facName].power;\n const otherPower = _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_23__[/* AllGangs */ \"a\"][otherGang].power;\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gang.storedCycles / 5);\n }\n },\n // end gang namespace\n // Bladeburner API\n bladeburner: {\n getContractNames: function () {\n updateDynamicRam(\"getContractNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function () {\n updateDynamicRam(\"getOperationNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function () {\n updateDynamicRam(\"getBlackOpNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (name = \"\") {\n updateDynamicRam(\"getBlackOpRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", name);\n return action.reqdRank;\n },\n getGeneralActionNames: function () {\n updateDynamicRam(\"getGeneralActionNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function () {\n updateDynamicRam(\"getSkillNames\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (type = \"\", name = \"\") {\n updateDynamicRam(\"startAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.startActionNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function () {\n updateDynamicRam(\"stopBladeburnerAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.resetAction();\n },\n getCurrentAction: function () {\n updateDynamicRam(\"getCurrentAction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTypeAndNameFromActionId(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.action);\n },\n getActionTime: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionTimeNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionEstimatedSuccessChance\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionEstimatedSuccessChance\"));\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionEstimatedSuccessChanceNetscriptFn(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (type = \"\", name = \"\", level) {\n updateDynamicRam(\"getActionRepGain\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\n\n if (level == null || isNaN(level)) {\n rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n } else {\n rewardMultiplier = Math.pow(action.rewardFac, level - 1);\n }\n\n return action.rankGain * rewardMultiplier * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_8__[/* BitNodeMultipliers */ \"a\"].BladeburnerRank;\n },\n getActionCountRemaining: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCountRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionMaxLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionCurrentLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (type = \"\", name = \"\", autoLevel = true) {\n updateDynamicRam(\"setActionAutolevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (type = \"\", name = \"\", level = 1) {\n updateDynamicRam(\"setActionLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n\n if (level < 1 || level > action.maxLevel) {\n throw makeRuntimeErrorMsg(\"bladeburner.setActionLevel\", `Level must be between 1 and ${action.maxLevel}, is ${level}`);\n }\n\n action.level = level;\n },\n getRank: function () {\n updateDynamicRam(\"getRank\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.rank;\n },\n getSkillPoints: function () {\n updateDynamicRam(\"getSkillPoints\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.skillPoints;\n },\n getSkillLevel: function (skillName = \"\") {\n updateDynamicRam(\"getSkillLevel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (skillName = \"\") {\n updateDynamicRam(\"getSkillUpgradeCost\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (skillName) {\n updateDynamicRam(\"upgradeSkill\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (type = \"\", name = \"\") {\n updateDynamicRam(\"getTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (type = \"\", name = \"\", size) {\n updateDynamicRam(\"setTeamSize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n\n try {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e) {\n throw makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (cityName) {\n updateDynamicRam(\"getCityEstimatedPopulation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedPopulation\"));\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].popEst;\n },\n getCityEstimatedCommunities: function (cityName) {\n updateDynamicRam(\"getCityEstimatedCommunities\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityEstimatedCommunities\"));\n checkBladeburnerAccess(\"getCityEstimatedCommunities\");\n checkBladeburnerCity(\"getCityEstimatedCommunities\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].commsEst;\n },\n getCityChaos: function (cityName) {\n updateDynamicRam(\"getCityChaos\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.cities[cityName].chaos;\n },\n getCity: function () {\n updateDynamicRam(\"getCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city;\n },\n switchCity: function (cityName) {\n updateDynamicRam(\"switchCity\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.city = cityName;\n },\n getStamina: function () {\n updateDynamicRam(\"getStamina\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n return [_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.stamina, _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function () {\n updateDynamicRam(\"joinBladeburnerFaction\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function () {\n updateDynamicRam(\"joinBladeburnerDivision\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"joinBladeburnerDivision\"));\n checkBladeburnerAccess(\"joinBladeburnerDivision\", true);\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 7 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_51__[/* SourceFileFlags */ \"a\"][7] > 0) {\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bitNodeN === 8) {\n return false;\n }\n\n if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner instanceof _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"]) {\n return true; // Already member\n } else if (_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].strength >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].defense >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].dexterity >= 100 && _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].agility >= 100) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner = new _Bladeburner_Bladeburner__WEBPACK_IMPORTED_MODULE_10__[/* Bladeburner */ \"a\"](_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n workerScript.log(\"joinBladeburnerDivision\", \"You have been accepted into the Bladeburner division\");\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n\n return true;\n } else {\n workerScript.log(\"joinBladeburnerDivision\", \"You do not meet the requirements for joining the Bladeburner division\");\n return false;\n }\n }\n },\n getBonusTime: function () {\n updateDynamicRam(\"getBonusTime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n return Math.round(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].bladeburner.storedCycles / 5);\n }\n },\n // End Bladeburner\n // Hi, if you're reading this you're a bit nosy.\n // There's a corporation API but it's very imbalanced right now.\n // It's here so players can test with if they want.\n corporation: {\n expandIndustry: function (industryName, divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewIndustry */ \"l\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, industryName, divisionName);\n },\n expandCity: function (divisionName, cityName) {\n const division = getDivision(divisionName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* NewCity */ \"k\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, division, cityName);\n },\n unlockUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_18__[/* CorporationUnlockUpgrades */ \"a\"]).find(upgrade => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UnlockUpgrade */ \"x\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n levelUpgrade: function (upgradeName) {\n const upgrade = Object.values(_Corporation_data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_19__[/* CorporationUpgrades */ \"a\"]).find(upgrade => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* LevelUpgrade */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, upgrade);\n },\n issueDividends: function (percent) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* IssueDividends */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, percent);\n },\n sellMaterial: function (divisionName, cityName, materialName, amt, price) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellMaterial */ \"o\"])(material, amt, price);\n },\n sellProduct: function (divisionName, cityName, productName, amt, price, all) {\n const product = getProduct(divisionName, productName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SellProduct */ \"p\"])(product, cityName, amt, price, all);\n },\n discontinueProduct: function (divisionName, productName) {\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (divisionName, cityName, enabled) {\n const warehouse = getWarehouse(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetSmartSupply */ \"u\"])(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function () {},\n buyMaterial: function (divisionName, cityName, materialName, amt) {\n const material = getMaterial(divisionName, cityName, materialName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyMaterial */ \"c\"])(material, amt);\n },\n employees: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n return office.employees.map(e => Object.assign({}, e));\n },\n assignJob: function (divisionName, cityName, employeeName, job) {\n const employee = getEmployee(divisionName, cityName, employeeName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* AssignJob */ \"a\"])(employee, job);\n },\n hireEmployee: function (divisionName, cityName) {\n const office = getOffice(divisionName, cityName);\n office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (divisionName, cityName, size) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeOfficeSize */ \"y\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, size);\n },\n throwParty: function (divisionName, cityName, costPerEmployee) {\n const office = getOffice(divisionName, cityName);\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ThrowParty */ \"w\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, office, costPerEmployee);\n },\n purchaseWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* PurchaseWarehouse */ \"m\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* UpgradeWarehouse */ \"z\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n buyCoffee: function (divisionName, cityName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* BuyCoffee */ \"b\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, cityName));\n },\n hireAdVert: function (divisionName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* HireAdVert */ \"f\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n makeProduct: function (divisionName, cityName, productName, designInvest, marketingInvest) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* MakeProduct */ \"j\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n research: function (divisionName, researchName) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* Research */ \"n\"])(getDivision(divisionName), researchName);\n },\n exportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* ExportMaterial */ \"e\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n cancelExportMaterial: function (sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* CancelExportMaterial */ \"d\"])(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA1 */ \"q\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (divisionName, cityName, materialName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetMaterialMarketTA2 */ \"r\"])(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA1 */ \"s\"])(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (divisionName, productName, on) {\n Object(_Corporation_Actions__WEBPACK_IMPORTED_MODULE_17__[/* SetProductMarketTA2 */ \"t\"])(getProduct(divisionName, productName), on);\n },\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (divisionName) {\n return getDivision(divisionName);\n },\n getOffice: function (divisionName, cityName) {\n return getOffice(divisionName, cityName);\n },\n getWarehouse: function (divisionName, cityName) {\n return getWarehouse(divisionName, cityName);\n },\n getMaterial: function (divisionName, cityName, materialName) {\n return getMaterial(divisionName, cityName, materialName);\n },\n getProduct: function (divisionName, productName) {\n return getProduct(divisionName, productName);\n },\n getEmployee: function (divisionName, cityName, employeeName) {\n return getEmployee(divisionName, cityName, employeeName);\n }\n },\n // End Corporation API\n // Coding Contract API\n codingcontract: {\n attempt: function (answer, fn, ip = workerScript.serverIp, {\n returnReward\n } = {}) {\n updateDynamicRam(\"attempt\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", ip, fn); // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n\n if (Object(_utils_helpers_is2DArray__WEBPACK_IMPORTED_MODULE_73__[/* is2DArray */ \"a\"])(answer)) {\n let answerComponents = [];\n\n for (let i = 0; i < answer.length; ++i) {\n answerComponents.push([\"[\", answer[i].toString(), \"]\"].join(\"\"));\n }\n\n answer = answerComponents.join(\",\");\n } else {\n answer = String(answer);\n }\n\n const serv = safeGetServer(ip, \"codingcontract.attempt\");\n\n if (contract.isSolution(answer)) {\n const reward = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].gainCodingContractReward(contract.reward, contract.getDifficulty());\n workerScript.log(\"attempt\", `Successfully completed Coding Contract '${fn}'. Reward: ${reward}`);\n serv.removeContract(fn);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. Contract is now self-destructing`);\n serv.removeContract(fn);\n } else {\n workerScript.log(\"attempt\", `Coding Contract attempt '${fn}' failed. ${contract.getMaxNumTries() - contract.tries} attempts remaining.`);\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getContractType\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", ip, fn);\n return contract.getType();\n },\n getData: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getData\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", ip, fn);\n const data = contract.getData();\n\n if (data.constructor === Array) {\n // For two dimensional arrays, we have to copy the internal arrays using\n // slice() as well. As of right now, no contract has arrays that have\n // more than two dimensions\n const copy = data.slice();\n\n for (let i = 0; i < copy.length; ++i) {\n if (data[i].constructor === Array) {\n copy[i] = data[i].slice();\n }\n }\n\n return copy;\n } else {\n return data;\n }\n },\n getDescription: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getDescription\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", ip, fn);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (fn, ip = workerScript.serverIp) {\n updateDynamicRam(\"getNumTriesRemaining\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", ip, fn);\n return contract.getMaxNumTries() - contract.tries;\n }\n },\n // End coding contracts\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: function () {\n updateDynamicRam(\"getNumSleeves\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length;\n },\n setToShockRecovery: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToShockRecovery\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].shockRecovery(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToSynchronize: function (sleeveNumber = 0) {\n updateDynamicRam(\"setToSynchronize\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].synchronize(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n },\n setToCommitCrime: function (sleeveNumber = 0, crimeName = \"\") {\n updateDynamicRam(\"setToCommitCrime\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].commitCrime(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], crimeName);\n },\n setToUniversityCourse: function (sleeveNumber = 0, universityName = \"\", className = \"\") {\n updateDynamicRam(\"setToUniversityCourse\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].takeUniversityCourse(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], universityName, className);\n },\n travel: function (sleeveNumber = 0, cityName = \"\") {\n updateDynamicRam(\"travel\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].travel(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], cityName);\n },\n setToCompanyWork: function (sleeveNumber = 0, companyName = \"\") {\n updateDynamicRam(\"setToCompanyWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber); // Cannot work at the same company that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Company && other.currentTaskLocation === companyName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForCompany(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], companyName);\n },\n setToFactionWork: function (sleeveNumber = 0, factionName = \"\", workType = \"\") {\n updateDynamicRam(\"setToFactionWork\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber); // Cannot work at the same faction that another sleeve is working at\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n\n const other = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[i];\n\n if (other.currentTask === _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"].Faction && other.currentTaskLocation === factionName) {\n throw makeRuntimeErrorMsg(\"sleeve.setToFactionWork\", `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`);\n }\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workForFaction(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], factionName, workType);\n },\n setToGymWorkout: function (sleeveNumber = 0, gymName = \"\", stat = \"\") {\n updateDynamicRam(\"setToGymWorkout\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].workoutAtGym(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], gymName, stat);\n },\n getSleeveStats: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveStats\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking_skill: sl.hacking_skill,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma\n };\n },\n getTask: function (sleeveNumber = 0) {\n updateDynamicRam(\"getTask\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n task: _PersonObjects_Sleeve_SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_68__[/* SleeveTaskType */ \"a\"][sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_28__[/* FactionWorkType */ \"a\"][sl.factionWorkType]\n };\n },\n getInformation: function (sleeveNumber = 0) {\n updateDynamicRam(\"getInformation\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n const sl = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber];\n return {\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].jobs),\n maxHp: sl.max_hp,\n tor: _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_50__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\"),\n // There's no reason not to give that infomation here as well. Worst case scenario it isn't used.\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n companyRep: sl.company_rep_mult,\n crimeMoney: sl.crime_money_mult,\n crimeSuccess: sl.crime_success_mult,\n defense: sl.defense_mult,\n defenseExp: sl.defense_exp_mult,\n dexterity: sl.dexterity_mult,\n dexterityExp: sl.dexterity_exp_mult,\n factionRep: sl.faction_rep_mult,\n hacking: sl.hacking_mult,\n hackingExp: sl.hacking_exp_mult,\n strength: sl.strength_mult,\n strengthExp: sl.strength_exp_mult,\n workMoney: sl.work_money_mult\n },\n timeWorked: sl.currentTaskTime,\n earningsForSleeves: {\n workHackExpGain: sl.earningsForSleeves.hack,\n workStrExpGain: sl.earningsForSleeves.str,\n workDefExpGain: sl.earningsForSleeves.def,\n workDexExpGain: sl.earningsForSleeves.dex,\n workAgiExpGain: sl.earningsForSleeves.agi,\n workChaExpGain: sl.earningsForSleeves.cha,\n workMoneyGain: sl.earningsForSleeves.money\n },\n earningsForPlayer: {\n workHackExpGain: sl.earningsForPlayer.hack,\n workStrExpGain: sl.earningsForPlayer.str,\n workDefExpGain: sl.earningsForPlayer.def,\n workDexExpGain: sl.earningsForPlayer.dex,\n workAgiExpGain: sl.earningsForPlayer.agi,\n workChaExpGain: sl.earningsForPlayer.cha,\n workMoneyGain: sl.earningsForPlayer.money\n },\n earningsForTask: {\n workHackExpGain: sl.earningsForTask.hack,\n workStrExpGain: sl.earningsForTask.str,\n workDefExpGain: sl.earningsForTask.def,\n workDexExpGain: sl.earningsForTask.dex,\n workAgiExpGain: sl.earningsForTask.agi,\n workChaExpGain: sl.earningsForTask.cha,\n workMoneyGain: sl.earningsForTask.money\n },\n workRepGain: sl.getRepGain(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"])\n };\n },\n getSleeveAugmentations: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleeveAugmentations\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n const augs = [];\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].augmentations[i].name);\n }\n\n return augs;\n },\n getSleevePurchasableAugs: function (sleeveNumber = 0) {\n updateDynamicRam(\"getSleevePurchasableAugs\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n const purchasableAugs = Object(_PersonObjects_Sleeve_SleeveHelpers__WEBPACK_IMPORTED_MODULE_69__[/* findSleevePurchasableAugs */ \"a\"])(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber], _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"]);\n const augs = [];\n\n for (let i = 0; i < purchasableAugs.length; i++) {\n const aug = purchasableAugs[i];\n augs.push({\n name: aug.name,\n cost: aug.startingCost\n });\n }\n\n return augs;\n },\n purchaseSleeveAug: function (sleeveNumber = 0, augName = \"\") {\n updateDynamicRam(\"purchaseSleeveAug\", Object(_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_2__[/* getRamCost */ \"c\"])(\"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_4__[/* Augmentations */ \"a\"][augName];\n\n if (!aug) {\n throw makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].sleeves[sleeveNumber].tryBuyAugmentation(_Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"], aug);\n }\n },\n // End sleeve\n formulas: {\n basic: {\n calculateSkill: function (exp, mult = 1) {\n checkFormulasAccess(\"basic.calculateSkill\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateSkill */ \"b\"])(exp, mult);\n },\n calculateExp: function (skill, mult = 1) {\n checkFormulasAccess(\"basic.calculateExp\", 5);\n return Object(_PersonObjects_formulas_skill__WEBPACK_IMPORTED_MODULE_38__[/* calculateExp */ \"a\"])(skill, mult);\n },\n hackChance: function (server, player) {\n checkFormulasAccess(\"basic.hackChance\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingChance */ \"b\"])(server, player);\n },\n hackExp: function (server, player) {\n checkFormulasAccess(\"basic.hackExp\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingExpGain */ \"c\"])(server, player);\n },\n hackPercent: function (server, player) {\n checkFormulasAccess(\"basic.hackPercent\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n },\n growPercent: function (server, threads, player, cores = 1) {\n checkFormulasAccess(\"basic.growPercent\", 5);\n return Object(_Server_formulas_grow__WEBPACK_IMPORTED_MODULE_21__[/* calculateServerGrowth */ \"a\"])(server, threads, player, cores);\n },\n hackTime: function (server, player) {\n checkFormulasAccess(\"basic.hackTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateHackingTime */ \"d\"])(server, player);\n },\n growTime: function (server, player) {\n checkFormulasAccess(\"basic.growTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateGrowTime */ \"a\"])(server, player);\n },\n weakenTime: function (server, player) {\n checkFormulasAccess(\"basic.weakenTime\", 5);\n return Object(_Hacking__WEBPACK_IMPORTED_MODULE_20__[/* calculateWeakenTime */ \"f\"])(server, player);\n }\n },\n hacknetNodes: {\n moneyGainRate: function (level, ram, cores, mult = 1) {\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateMoneyGainRate */ \"c\"])(level, ram, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateLevelUpgradeCost */ \"b\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateCoreUpgradeCost */ \"a\"])(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (n, mult) {\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\", 5);\n return Object(_Hacknet_formulas_HacknetNodes__WEBPACK_IMPORTED_MODULE_31__[/* calculateNodeCost */ \"d\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetNodes.constants\", 5);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetNodeConstants */ \"a\"]);\n }\n },\n hacknetServers: {\n hashGainRate: function (level, ramUsed, maxRam, cores, mult = 1) {\n checkFormulasAccess(\"hacknetServers.hashGainRate\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateHashGainRate */ \"c\"])(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (startingLevel, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateLevelUpgradeCost */ \"d\"])(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (startingRam, extraLevels = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateRamUpgradeCost */ \"e\"])(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (startingCore, extraCores = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCoreUpgradeCost */ \"b\"])(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (startingCache, extraCache = 1, costMult = 1) {\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateCacheUpgradeCost */ \"a\"])(startingCache, extraCache, costMult);\n },\n hashUpgradeCost: function (upgName, level) {\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\", 9);\n const upg = _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].hashManager.getUpgrade(upgName);\n\n if (!upg) {\n throw makeRuntimeErrorMsg(\"formulas.hacknetServers.calculateHashUpgradeCost\", `Invalid Hash Upgrade: ${upgName}`);\n }\n\n return upg.getCost(level);\n },\n hacknetServerCost: function (n, mult) {\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\", 9);\n return Object(_Hacknet_formulas_HacknetServers__WEBPACK_IMPORTED_MODULE_32__[/* calculateServerCost */ \"f\"])(n, mult);\n },\n constants: function () {\n checkFormulasAccess(\"hacknetServers.constants\", 9);\n return Object.assign({}, _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_33__[/* HacknetServerConstants */ \"b\"]);\n }\n }\n },\n // end formulas\n heart: {\n // Easter egg function\n break: function () {\n return _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].karma;\n }\n },\n exploit: function () {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].UndocumentedFunctionCall);\n },\n bypass: function (doc) {\n // reset both fields first\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined; // set one to true and check that it affected the other.\n\n document.completely_unused_field = true;\n\n if (doc.completely_unused_field && workerScript.ramUsage === 1.6) {\n _Player__WEBPACK_IMPORTED_MODULE_41__[/* Player */ \"a\"].giveExploit(_Exploits_Exploit_ts__WEBPACK_IMPORTED_MODULE_70__[/* Exploit */ \"a\"].Bypass);\n }\n\n doc.completely_unused_field = undefined;\n document.completely_unused_field = undefined;\n },\n flags: function (data) {\n data = toNative(data); // We always want the help flag.\n\n const args = {};\n\n for (const d of data) {\n let t = String;\n\n if (typeof d[1] === \"number\") {\n t = Number;\n } else if (typeof d[1] === \"boolean\") {\n t = Boolean;\n } else if (Array.isArray(d[1])) {\n t = [String];\n }\n\n const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n\n const ret = arg__WEBPACK_IMPORTED_MODULE_1__(args, {\n argv: workerScript.args\n });\n\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\n }\n\n for (const key of Object.keys(ret)) {\n if (!key.startsWith(\"-\")) continue;\n const value = ret[key];\n delete ret[key];\n const numDashes = key.length === 2 ? 1 : 2;\n ret[key.slice(numDashes)] = value;\n }\n\n return ret;\n }\n };\n\n function getFunctionNames(obj) {\n const functionNames = [];\n\n for (const [key, value] of Object.entries(obj)) {\n if (typeof value == \"function\") {\n functionNames.push(key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value));\n }\n }\n\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(functions)].map(a => [a, true]));\n return functions;\n} // End NetscriptFunction()\n\n\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/NetscriptFunctions.js?"); /***/ }), -/* 393 */ +/* 394 */ /*!**************************!*\ !*** ./src/Gang/Gang.ts ***! \**************************/ @@ -2671,7 +2683,7 @@ eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./data/Constants */ 231);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _GangMember__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./GangMember */ 702);\n/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\n\n\n\n\n\n\n\n\n\n\nclass Gang {\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n this.isHackingGang = hacking;\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0; // When processing gains, this stores the number of cycles until some\n // limit is reached, and then calculates and applies the gains only at that limit\n\n this.storedCycles = 0; // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n\n this.storedTerritoryAndPowerCycles = 0;\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n this.notifyMemberDeath = true;\n }\n\n getPower() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power;\n }\n\n getTerritory() {\n return _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].territory;\n }\n\n process(numCycles = 1, player) {\n const CyclesPerSecond = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_7__[/* CONSTANTS */ \"a\"]._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n\n this.storedCycles += numCycles; // Only process if there are at least 2 seconds, and at most 5 seconds\n\n if (this.storedCycles < 2 * CyclesPerSecond) return;\n const cycles = Math.min(this.storedCycles, 5 * CyclesPerSecond);\n\n try {\n this.processGains(cycles, player);\n this.processExperienceGains(cycles);\n this.processTerritoryAndPowerGains(cycles);\n this.storedCycles -= cycles;\n } catch (e) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player) {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n respectGains += this.members[i].calculateRespectGain(this);\n moneyGains += this.members[i].calculateMoneyGain(this);\n const wantedLevelGain = this.members[i].calculateWantedLevelGain(this);\n wantedLevelGains += wantedLevelGain;\n if (this.members[i].getTask().baseWanted < 0) justice++; // this member is lowering wanted.\n }\n\n this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain; // Faction reputation gains is respect gain divided by some constant\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][this.facName];\n\n if (!(fac instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_0__[/* Faction */ \"a\"])) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\");\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n\n const favorMult = 1 + fac.favor / 100;\n fac.playerReputation += player.faction_rep_mult * gain * favorMult / _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].GangRespectToReputationRatio; // Keep track of respect gained per member\n\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\n }\n\n if (!(this.wanted === 1 && wantedLevelGains < 0)) {\n const oldWanted = this.wanted;\n let newWanted = oldWanted + wantedLevelGains * numCycles;\n newWanted = newWanted * (1 - justice * 0.001); // safeguard\n // Prevent overflow\n\n if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n\n player.gainMoney(moneyGains * numCycles);\n player.recordMoneySource(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1) {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].CyclesPerTerritoryAndPowerUpdate; // Process power first\n\n const gangName = this.facName;\n\n for (const name in _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"]) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"].hasOwnProperty(name)) {\n if (name == gangName) {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\n\n if (gainRoll < 0.5) {\n // Multiplicative gain (50% chance)\n // This is capped per cycle, to prevent it from getting out of control\n const multiplicativeGain = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power * 0.005;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const additiveGain = 0.75 * gainRoll * _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].territory;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][name].power += additiveGain;\n }\n }\n }\n } // Determine if territory should be processed\n\n\n if (this.territoryWarfareEngaged) {\n this.territoryClashChance = 1;\n } else if (this.territoryClashChance > 0) {\n // Engagement turned off, but still a positive clash chance. So there's\n // still a chance of clashing but it slowly goes down over time\n this.territoryClashChance = Math.max(0, this.territoryClashChance - 0.01);\n } // Then process territory\n\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.length; ++i) {\n const others = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names.filter(e => {\n return e !== _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n });\n const other = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_5__[/* getRandomInt */ \"a\"])(0, others.length - 1);\n const thisGang = _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].Names[i];\n const otherGang = others[other]; // If either of the gangs involved in this clash is the player, determine\n // whether to skip or process it using the clash chance\n\n if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power;\n const otherPwr = _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang, loseGang) {\n const powerBonus = Math.max(1, 1 + Math.log(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][winGang].power / _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].power) / Math.log(50));\n const gains = Math.min(_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory += territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory -= territoryGain;\n\n if (thisGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].power *= 1 / 1.01;\n }\n } else {\n if (_AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].territory -= territoryGain;\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][otherGang].territory += territoryGain;\n\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n } else {\n _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1) {\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].gainExperience(numCycles);\n this.members[i].updateSkillLevels();\n }\n }\n\n clash(won = false) {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2; // If the clash was lost, the player loses a small percentage of power\n else _AllGangs__WEBPACK_IMPORTED_MODULE_9__[/* AllGangs */ \"a\"][this.facName].power *= 1 / 1.008; // Deaths can only occur during X% of clashes\n\n if (Math.random() < 0.65) return;\n\n for (let i = this.members.length - 1; i >= 0; --i) {\n const member = this.members[i]; // Only members assigned to Territory Warfare can die\n\n if (member.task !== \"Territory Warfare\") continue; // Chance to die is decreased based on defense\n\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember() {\n if (this.members.length >= _data_Constants__WEBPACK_IMPORTED_MODULE_6__[/* GangConstants */ \"a\"].MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember() {\n // First N gang members are free (can be recruited at 0 respect)\n const numFreeMembers = 3;\n if (this.members.length < numFreeMembers) return 0;\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name) {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false; // Check for already-existing names\n\n const sameNames = this.members.filter(m => m.name === name);\n if (sameNames.length >= 1) return false;\n const member = new _GangMember__WEBPACK_IMPORTED_MODULE_10__[/* GangMember */ \"a\"](name);\n this.members.push(member);\n return true;\n } // Money and Respect gains multiplied by this number (< 1)\n\n\n getWantedPenalty() {\n return this.respect / (this.respect + this.wanted);\n } //Calculates power GAIN, which is added onto the Gang's existing power\n\n\n calculatePower() {\n let memberTotal = 0;\n\n for (let i = 0; i < this.members.length; ++i) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\") continue;\n memberTotal += this.members[i].calculatePower();\n }\n\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member) {\n // Player loses a percentage of total respect, plus whatever respect that member has earned\n const totalRespect = this.respect;\n const lostRespect = 0.05 * totalRespect + member.earnedRespect;\n this.respect = Math.max(0, totalRespect - lostRespect);\n\n for (let i = 0; i < this.members.length; ++i) {\n if (member.name === this.members[i].name) {\n this.members.splice(i, 1);\n break;\n }\n } // Notify of death\n\n\n if (this.notifyMemberDeath) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member, workerScript) {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n\n if (workerScript) {\n workerScript.log(\"ascend\", `Ascended Gang member ${member.name}`);\n }\n\n return res;\n } catch (e) {\n if (workerScript == null) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n }\n\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n } // Cost of upgrade gets cheaper as gang increases in respect + power\n\n\n getDiscount() {\n const power = this.getPower();\n const respect = this.respect;\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount = Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n } // Returns only valid tasks for this gang. Excludes 'Unassigned'\n\n\n getAllTaskNames() {\n return Object.keys(_GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"]).filter(taskName => {\n const task = _GangMemberTasks__WEBPACK_IMPORTED_MODULE_8__[/* GangMemberTasks */ \"a\"][taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false; // yes you need both checks\n\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg) {\n if (upg == null) {\n return Infinity;\n }\n\n return upg.cost / this.getDiscount();\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_toJSON */ \"b\"])(\"Gang\", this);\n }\n /**\n * Initiatizes a Gang object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Generic_fromJSON */ \"a\"])(Gang, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_3__[/* Reviver */ \"c\"].constructors.Gang = Gang;\n\n//# sourceURL=webpack:///./src/Gang/Gang.ts?"); /***/ }), -/* 394 */ +/* 395 */ /*!**********************************************!*\ !*** ./src/StockMarket/PlayerInfluencing.ts ***! \**********************************************/ @@ -2680,10 +2692,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export forecastForecastChangeFromHack */\n/* unused harmony export forecastForecastChangeFromCompanyWork */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return influenceStockThroughServerHack; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return influenceStockThroughServerGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return influenceStockThroughCompanyWork; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 103);\n/* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockMarket */ 74);\n/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\n\n\n// Change in second-order forecast due to hacks/grows\nconst forecastForecastChangeFromHack = 0.1; // Change in second-order forecast due to company work\n\nconst forecastForecastChangeFromCompanyWork = 0.001;\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\n\nfunction influenceStockThroughServerHack(server, moneyHacked) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\n\nfunction influenceStockThroughServerGrow(server, moneyGrown) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\n\nfunction influenceStockThroughCompanyWork(company, performanceMult, cyclesOfWork) {\n const compName = company.name;\n let stock = null;\n\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][compName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/PlayerInfluencing.ts?"); +eval("/* unused harmony export forecastForecastChangeFromHack */\n/* unused harmony export forecastForecastChangeFromCompanyWork */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return influenceStockThroughServerHack; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return influenceStockThroughServerGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return influenceStockThroughCompanyWork; });\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Stock */ 104);\n/* harmony import */ var _StockMarket__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockMarket */ 74);\n/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\n\n\n// Change in second-order forecast due to hacks/grows\nconst forecastForecastChangeFromHack = 0.1; // Change in second-order forecast due to company work\n\nconst forecastForecastChangeFromCompanyWork = 0.001;\n/**\n * Potentially decreases a stock's second-order forecast when its corresponding\n * server is hacked. The chance of the hack decreasing the stock's second-order\n * forecast is dependent on what percentage of the server's money is hacked\n * @param {Server} server - Server being hack()ed\n * @param {number} moneyHacked - Amount of money stolen from the server\n */\n\nfunction influenceStockThroughServerHack(server, moneyHacked) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when its corresponding\n * server is grown (grow()). The chance of the grow() to increase the stock's\n * second-order forecast is dependent on how much money is added to the server\n * @param {Server} server - Server being grow()n\n * @param {number} moneyHacked - Amount of money added to the server\n */\n\nfunction influenceStockThroughServerGrow(server, moneyGrown) {\n const orgName = server.organizationName;\n let stock = null;\n\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][orgName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\n}\n/**\n * Potentially increases a stock's second-order forecast when the player works for\n * its corresponding company.\n * @param {Company} company - Company being worked for\n * @param {number} performanceMult - Effectiveness of player's work. Affects influence\n * @param {number} cyclesOfWork - # game cycles of work being processed\n */\n\nfunction influenceStockThroughCompanyWork(company, performanceMult, cyclesOfWork) {\n const compName = company.name;\n let stock = null;\n\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = _StockMarket__WEBPACK_IMPORTED_MODULE_1__[/* StockMarket */ \"a\"][compName];\n }\n\n if (!(stock instanceof _Stock__WEBPACK_IMPORTED_MODULE_0__[/* Stock */ \"a\"])) {\n return;\n }\n\n if (Math.random() < 0.002 * cyclesOfWork) {\n const change = forecastForecastChangeFromCompanyWork * performanceMult;\n stock.changeForecastForecast(stock.otlkMagForecast + change);\n }\n}\n\n//# sourceURL=webpack:///./src/StockMarket/PlayerInfluencing.ts?"); /***/ }), -/* 395 */ +/* 396 */ /*!**********************************************!*\ !*** ./src/Company/GetJobRequirementText.ts ***! \**********************************************/ @@ -2695,12 +2707,12 @@ eval("/* unused harmony export forecastForecastChangeFromHack */\n/* unused harm eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getJobRequirementText; });\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\nfunction getJobRequirementText(company, pos, tooltiptext = false) {\n let reqText = \"\";\n const offset = company.jobStatReqOffset;\n const reqHacking = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep = pos.requiredReputation;\n\n if (tooltiptext) {\n reqText = \"Requires:
\";\n reqText += reqHacking.toString() + \" hacking
\";\n reqText += reqStrength.toString() + \" strength
\";\n reqText += reqDefense.toString() + \" defense
\";\n reqText += reqDexterity.toString() + \" dexterity
\";\n reqText += reqAgility.toString() + \" agility
\";\n reqText += reqCharisma.toString() + \" charisma
\";\n reqText += reqRep.toString() + \" reputation\";\n } else {\n reqText = \"(Requires \";\n\n if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n\n return reqText;\n}\n\n//# sourceURL=webpack:///./src/Company/GetJobRequirementText.ts?"); /***/ }), -/* 396 */, /* 397 */, /* 398 */, /* 399 */, /* 400 */, -/* 401 */ +/* 401 */, +/* 402 */ /*!*****************************************!*\ !*** ./src/ui/React/ReputationRate.tsx ***! \*****************************************/ @@ -2712,8 +2724,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ReputationRate; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n\n\nfunction ReputationRate(reputation) {\n return Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_1__[/* Reputation */ \"a\"])(`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatReputation(reputation)} / sec`);\n}\n\n//# sourceURL=webpack:///./src/ui/React/ReputationRate.tsx?"); /***/ }), -/* 402 */, -/* 403 */ +/* 403 */, +/* 404 */ /*!****************************************!*\ !*** ./src/ui/React/CinematicText.tsx ***! \****************************************/ @@ -2722,10 +2734,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CinematicLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CinematicLine */ 1053);\n\n\nfunction CinematicText(props) {\n const [i, setI] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newI = i + 1;\n setI(newI);\n\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, props.lines.slice(0, i).map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n key: i\n }, line)), props.lines.length > i && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CinematicLine__WEBPACK_IMPORTED_MODULE_1__[/* CinematicLine */ \"a\"], {\n key: i,\n text: props.lines[i],\n onDone: advance\n }), !props.auto && props.onDone && done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: props.onDone\n }, \"Continue ...\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicText.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CinematicLine__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CinematicLine */ 1055);\n\n\nfunction CinematicText(props) {\n const [i, setI] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newI = i + 1;\n setI(newI);\n\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, props.lines.slice(0, i).map((line, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n key: i\n }, line)), props.lines.length > i && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CinematicLine__WEBPACK_IMPORTED_MODULE_1__[/* CinematicLine */ \"a\"], {\n key: i,\n text: props.lines[i],\n onDone: advance\n }), !props.auto && props.onDone && done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: props.onDone\n }, \"Continue ...\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicText.tsx?"); /***/ }), -/* 404 */ +/* 405 */ /*!****************************************!*\ !*** ./utils/helpers/getRandomByte.ts ***! \****************************************/ @@ -2737,7 +2749,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getRandomByte; });\n/* harmony import */ var _getRandomInt__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getRandomInt */ 18);\n\n/**\n * Gets a random value in the range of a byte (0 - 255), or up to the maximum.\n * @param max The maximum value (up to 255).\n */\n\nfunction getRandomByte(max) {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper = Math.max(Math.min(max, byteMaximum), 0);\n return Object(_getRandomInt__WEBPACK_IMPORTED_MODULE_0__[/* getRandomInt */ \"a\"])(0, upper);\n}\n\n//# sourceURL=webpack:///./utils/helpers/getRandomByte.ts?"); /***/ }), -/* 405 */ +/* 406 */ /*!****************************************!*\ !*** ./src/Locations/createCityMap.ts ***! \****************************************/ @@ -2746,10 +2758,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createCityMap; });\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Cities */ 104);\n/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\n\nfunction createCityMap(initValue) {\n const map = {};\n const cities = Object.keys(_Cities__WEBPACK_IMPORTED_MODULE_0__[/* Cities */ \"a\"]);\n\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n return map;\n}\n\n//# sourceURL=webpack:///./src/Locations/createCityMap.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createCityMap; });\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Cities */ 105);\n/**\n * Utility function that creates a \"city map\", which is an object where\n * each city is a key (property).\n *\n * This map uses the official name of the city, NOT its key in the 'Cities' object\n */\n\nfunction createCityMap(initValue) {\n const map = {};\n const cities = Object.keys(_Cities__WEBPACK_IMPORTED_MODULE_0__[/* Cities */ \"a\"]);\n\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n return map;\n}\n\n//# sourceURL=webpack:///./src/Locations/createCityMap.ts?"); /***/ }), -/* 406 */ +/* 407 */ /*!*****************************************!*\ !*** ./src/Hacking/netscriptCanHack.ts ***! \*****************************************/ @@ -2761,12 +2773,12 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return netscriptCanHack; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return netscriptCanGrow; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return netscriptCanWeaken; });\n/**\n * Functions used to determine whether the target can be hacked (or grown/weakened).\n * Meant to be used for Netscript implementation\n *\n * The returned status object's message should be used for logging in Netscript\n */\nfunction baseCheck(server, fnName) {\n const hostname = server.hostname;\n\n if (!(\"requiredHackingSkill\" in server)) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because it is a Hacknet Node`\n };\n }\n\n if (server.hasAdminRights === false) {\n return {\n res: false,\n msg: `Cannot ${fnName} ${hostname} server because you do not have root access`\n };\n }\n\n return {\n res: true\n };\n}\n\nfunction netscriptCanHack(server, p) {\n const initialCheck = baseCheck(server, \"hack\");\n\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n\n if (s.requiredHackingSkill > p.hacking_skill) {\n return {\n res: false,\n msg: `Cannot hack ${server.hostname} server because your hacking skill is not high enough`\n };\n }\n\n return {\n res: true\n };\n}\nfunction netscriptCanGrow(server) {\n return baseCheck(server, \"grow\");\n}\nfunction netscriptCanWeaken(server) {\n return baseCheck(server, \"weaken\");\n}\n\n//# sourceURL=webpack:///./src/Hacking/netscriptCanHack.ts?"); /***/ }), -/* 407 */, /* 408 */, /* 409 */, /* 410 */, /* 411 */, -/* 412 */ +/* 412 */, +/* 413 */ /*!*************************************!*\ !*** ./src/Casino/CardDeck/Hand.ts ***! \*************************************/ @@ -2778,7 +2790,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Hand; });\n/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\nclass Hand {\n constructor(cards) {\n this.cards = cards;\n }\n\n addCards(...cards) {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i) {\n if (i >= this.cards.length) {\n throw new Error(`Tried to remove invalid card from Hand by index: ${i}`);\n }\n\n return new Hand([...this.cards.slice().splice(i, 1)]);\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Hand.ts?"); /***/ }), -/* 413 */ +/* 414 */ /*!****************************************************!*\ !*** ./src/StockMarket/ui/StockTickerTxButton.tsx ***! \****************************************************/ @@ -2790,7 +2802,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerTxButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\n\nfunction StockTickerTxButton(props) {\n let className = \"stock-market-input std-button\";\n const hasTooltip = props.tooltip != null;\n\n if (hasTooltip) {\n className += \" tooltip\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: props.onClick\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx?"); /***/ }), -/* 414 */ +/* 415 */ /*!************************************************!*\ !*** ./src/StockMarket/ui/PlaceOrderPopup.tsx ***! \************************************************/ @@ -2802,7 +2814,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlaceOrderPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\nfunction PlaceOrderPopup(props) {\n const [price, setPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n\n function onClick() {\n if (price === null) return;\n if (isNaN(price)) return;\n props.place(price);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onChange(event) {\n if (event.target.value === \"\") setPrice(null);else setPrice(parseFloat(event.target.value));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.text), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n type: \"number\",\n onChange: onChange,\n placeholder: \"price\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: onClick\n }, props.placeText));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/PlaceOrderPopup.tsx?"); /***/ }), -/* 415 */, /* 416 */, /* 417 */, /* 418 */, @@ -2816,7 +2827,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 426 */, /* 427 */, /* 428 */, -/* 429 */ +/* 429 */, +/* 430 */ /*!************************************!*\ !*** ./src/Faction/FactionInfo.ts ***! \************************************/ @@ -2828,7 +2840,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* unused harmony export FactionInfo */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionInfos; });\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nclass FactionInfo {\n /**\n * The multiplier to apply to augmentation base purchase price.\n */\n\n /**\n * The multiplier to apply to augmentation reputation base requirement.\n */\n\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n\n /**\n * The descriptive text to show on the faction's page.\n */\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports hacking missions to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n constructor(infoText, enemies, offerHackingMission, offerHackingWork, offerFieldWork, offerSecurityWork) {\n this.infoText = infoText;\n this.enemies = enemies;\n this.offerHackingMission = offerHackingMission;\n this.offerHackingWork = offerHackingWork;\n this.offerFieldWork = offerFieldWork;\n this.offerSecurityWork = offerSecurityWork; // These are always all 1 for now.\n\n this.augmentationPriceMult = 1;\n this.augmentationRepRequirementMult = 1;\n }\n\n offersWork() {\n return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;\n }\n\n}\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\n\nconst FactionInfos = {\n // Endgame\n Illuminati: new FactionInfo(\"Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. \" + \"And from this chaos, we are the invisible hand that guides them to order. \", [], true, true, true, false),\n Daedalus: new FactionInfo(\"Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.\", [], true, true, true, false),\n \"The Covenant\": new FactionInfo(\"Surrender yourself. Give up your empty individuality to become part of something great, something eternal. \" + \"Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.
\" + \"
\" + \"Only then can you discover immortality.\", [], true, true, true, false),\n // Megacorporations, each forms its own faction\n ECorp: new FactionInfo(\"ECorp's mission is simple: to connect the world of today with the technology of tomorrow. With our wide \" + \"range of Internet-related software and commercial hardware, ECorp makes the world's information \" + \"universally accessible.\", [], true, true, true, true),\n MegaCorp: new FactionInfo(\"MegaCorp does what no other dares to do. We imagine. We create. We invent. We create what others have \" + \"never even dreamed of. Our work fills the world's needs for food, water, power, and transporation on an \" + \"unprecendented scale, in ways that no other company can.
\" + \"
\" + \"In our labs and factories and on the ground with customers, MegaCorp is ushering in a new era for the world.\", [], true, true, true, true),\n \"Bachman & Associates\": new FactionInfo(\"Where Law and Business meet - thats where we are.
\" + \"
\" + \"Legal Insight - Business Instinct - Innovative Experience.\", [], true, true, true, true),\n \"Blade Industries\": new FactionInfo(\"Augmentation is Salvation.\", [], true, true, true, true),\n NWO: new FactionInfo(\"Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to \" + \"be given purpose and direction in life. That is why they created God. And that is why they created \" + \"civilization - not because of willingness, but because of a need to be incorporated into higher orders of \" + \"structure and meaning.\", [], true, true, true, true),\n \"Clarke Incorporated\": new FactionInfo(\"The Power of the Genome - Unlocked.\", [], true, true, true, true),\n \"OmniTek Incorporated\": new FactionInfo(\"Simply put, our mission is to design and build robots that make a difference.\", [], true, true, true, true),\n \"Four Sigma\": new FactionInfo(\"The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven \" + \"by deep learning and innovative ideas. And improved by iteration. That's Four Sigma.\", [], true, true, true, true),\n \"KuaiGong International\": new FactionInfo(\"Dream big. Work hard. Make history.\", [], true, true, true, true),\n // Other Corporations\n \"Fulcrum Secret Technologies\": new FactionInfo(\"The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it \" + \"would be necessary to create them. And now we can.\", [], true, true, false, true),\n // Hacker groups\n BitRunners: new FactionInfo(\"Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's \" + \"all transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, \" + \"to live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they \" + \"leave behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be \" + \"reconstructed. Transformed. Used.
\" + \"
\" + \"Those who run the bits, run the world.\", [], true, true, false, false),\n \"The Black Hand\": new FactionInfo(\"The world, so afraid of strong government, now has no government. Only power - Digital power. Financial \" + \"power. Technological power. And those at the top rule with an invisible hand. They built a society where the \" + \"rich get richer, and everyone else suffers.
\" + \"
\" + \"So much pain. So many lives. Their darkness must end.\", [], true, true, true, false),\n NiteSec: new FactionInfo(\" __..__
\" + \" _.nITESECNIt.
\" + \" .-'NITESECNITESEc.
\" + \" .' NITESECNITESECn
\" + \" / NITESECNITESEC;
\" + \" : :NITESECNITESEC;
\" + \" ; $ NITESECNITESECN
\" + \" : _, ,N'ITESECNITESEC
\" + \" : .+^^`, : `NITESECNIT
\" + \" ) /), `-,-=,NITESECNI
\" + \" / ^ ,-;|NITESECN;
\" + \" / _.' '-';NITESECN
\" + \" ( , ,-''`^NITE'
\" + \" )` :`. .'
\" + \" )-- ; `- /
\" + \" ' _.-' :
\" + \" ( _.-' .
\" + \" ------.
\" + \" .
\" + \" _.nIt
\" + \" _.nITESECNi
\" + \" nITESECNIT^'
\" + \" NITE^' ___
\" + \" / .gP''''Tp.
\" + \" : d' . `b
\" + \" ; d' o `b ;
\" + \" / d; `b|
\" + \" /, $; @ `:
\" + \" /' $$ ;
\" + \" .' $$b o |
\" + \" .' d$$$; :
\" + \" / .d$$$$; , ;
\" + \" d .dNITESEC $ |
\" + \" :bp.__.gNITESEC$$ :$ ;
\" + \" NITESECNITESECNIT $$b :
\", [], true, true, false, false),\n // City factions, essentially governments\n Aevum: new FactionInfo(\"The Silicon City.\", [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"], true, true, true, true),\n Chongqing: new FactionInfo(\"Serve the People.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n Ishima: new FactionInfo(\"The East Asian Order of the Future.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n \"New Tokyo\": new FactionInfo(\"Asia's World City.\", [\"Sector-12\", \"Aevum\", \"Volhaven\"], true, true, true, true),\n \"Sector-12\": new FactionInfo(\"The City of the Future.\", [\"Chongqing\", \"New Tokyo\", \"Ishima\", \"Volhaven\"], true, true, true, true),\n Volhaven: new FactionInfo(\"Benefit, Honor, and Glory.\", [\"Chongqing\", \"Sector-12\", \"New Tokyo\", \"Aevum\", \"Ishima\"], true, true, true, true),\n // Criminal Organizations/Gangs\n \"Speakers for the Dead\": new FactionInfo(\"It is better to reign in Hell than to serve in Heaven.\", [], true, true, true, true),\n \"The Dark Army\": new FactionInfo(\"The World doesn't care about right or wrong. It only cares about power.\", [], true, true, true, false),\n \"The Syndicate\": new FactionInfo(\"Honor holds you back.\", [], true, true, true, true),\n Silhouette: new FactionInfo(\"Corporations have filled the void of power left behind by the collapse of Western government. The issue is \" + \"they've become so big that you don't know who they're working for. And if you're employed at one of these \" + \"corporations, you don't even know who you're working for.
\" + \"
\" + \"That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\", [], true, true, true, false),\n Tetrads: new FactionInfo(\"Following the mandate of Heaven and carrying out the way.\", [], false, false, true, true),\n \"Slum Snakes\": new FactionInfo(\"Slum Snakes rule!\", [], false, false, true, true),\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n Netburners: new FactionInfo(\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\", [], true, true, false, false),\n \"Tian Di Hui\": new FactionInfo(\"Obey Heaven and work righteously.\", [], true, true, false, true),\n CyberSec: new FactionInfo(\"The Internet is the first thing that was built that we don't fully understand, the largest \" + \"experiment in anarchy that we have ever had. And as the world becomes increasingly dominated by it, \" + \"society approaches the brink of total chaos. We serve only to protect society, to protect humanity, to \" + \"protect the world from imminent collapse.\", [], true, true, false, false),\n // Special Factions\n Bladeburners: new FactionInfo(\"It's too bad they won't live. But then again, who does?

Note that for this faction, reputation can \" + \"only be gained through Bladeburner actions. Completing Bladeburner contracts/operations will increase your \" + \"reputation.\", [], false, false, false, false)\n};\n\n//# sourceURL=webpack:///./src/Faction/FactionInfo.ts?"); /***/ }), -/* 430 */ +/* 431 */ /*!*********************************************!*\ !*** ./src/Literature/LiteratureHelpers.ts ***! \*********************************************/ @@ -2840,7 +2852,7 @@ eval("/* unused harmony export FactionInfo */\n/* harmony export (binding) */ __ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return showLiterature; });\n/* harmony import */ var _Literatures__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Literatures */ 643);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n\n\nfunction showLiterature(fn) {\n const litObj = _Literatures__WEBPACK_IMPORTED_MODULE_0__[/* Literatures */ \"a\"][fn];\n\n if (litObj == null) {\n return;\n }\n\n const txt = `${litObj.title}

${litObj.txt}`;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_1__[/* dialogBoxCreate */ \"a\"])(txt);\n}\n\n//# sourceURL=webpack:///./src/Literature/LiteratureHelpers.ts?"); /***/ }), -/* 431 */ +/* 432 */ /*!**********************************!*\ !*** ./src/Server/BaseServer.ts ***! \**********************************/ @@ -2849,10 +2861,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseServer; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Script/Script */ 285);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../TextFile */ 196);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Abstract Base Class for any Server object\n */\n\n\n\n\n\n\n\nclass BaseServer {\n // Coding Contract files on this server\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n // Flag indicating whether the FTP port is open\n // Flag indicating whether player has admin/root access to this server\n // Hostname. Must be unique\n // Flag indicating whether HTTP Port is open\n // IP Address. Must be unique\n // Flag indicating whether player is curently connected to this server\n // RAM (GB) available on this server\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n // Programs on this servers. Contains only the names of the programs\n // RAM (GB) used. i.e. unavailable RAM\n // RunningScript files on this server\n // Script files on this Server\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n // Flag indicating whether SMTP Port is open\n // Flag indicating whether SQL Port is open\n // Flag indicating whether the SSH Port is open\n // Text files on this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])()\n }) {\n _defineProperty(this, \"contracts\", []);\n\n _defineProperty(this, \"cpuCores\", 1);\n\n _defineProperty(this, \"ftpPortOpen\", false);\n\n _defineProperty(this, \"hasAdminRights\", false);\n\n _defineProperty(this, \"hostname\", \"\");\n\n _defineProperty(this, \"httpPortOpen\", false);\n\n _defineProperty(this, \"ip\", \"\");\n\n _defineProperty(this, \"isConnectedTo\", false);\n\n _defineProperty(this, \"maxRam\", 0);\n\n _defineProperty(this, \"messages\", []);\n\n _defineProperty(this, \"organizationName\", \"\");\n\n _defineProperty(this, \"programs\", []);\n\n _defineProperty(this, \"ramUsed\", 0);\n\n _defineProperty(this, \"runningScripts\", []);\n\n _defineProperty(this, \"scripts\", []);\n\n _defineProperty(this, \"serversOnNetwork\", []);\n\n _defineProperty(this, \"smtpPortOpen\", false);\n\n _defineProperty(this, \"sqlPortOpen\", false);\n\n _defineProperty(this, \"sshPortOpen\", false);\n\n _defineProperty(this, \"textFiles\", []);\n\n this.ip = params.ip ? params.ip : Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])();\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false; //Access information\n\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract) {\n this.contracts.push(contract);\n }\n\n getContract(contractName) {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n\n return null;\n }\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n\n\n getRunningScript(scriptName, scriptArgs) {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__[/* compareArrays */ \"a\"])(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n\n\n getScript(scriptName) {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n\n\n isRunning(fn) {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract) {\n if (contract instanceof _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"]) {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract;\n });\n }\n }\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n\n\n removeFile(fn) {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\"\n };\n }\n\n this.scripts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n }\n\n return {\n res: false,\n msg: \"No such file exists\"\n };\n }\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n\n\n runScript(script) {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram) {\n this.maxRam = ram;\n }\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n\n\n writeToScriptFile(fn, code) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n return ret;\n } // Check if the script already exists, and overwrite it if it does\n\n\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n } // Otherwise, create a new script\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_1__[/* Script */ \"a\"](fn, code, this.ip, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n } // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n\n\n writeToTextFile(fn, txt) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n } // Check if the text file already exists, and overwrite if it does\n\n\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n } // Otherwise create a new text file\n\n\n const newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_3__[/* TextFile */ \"a\"](fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Server/BaseServer.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BaseServer; });\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Script/Script */ 286);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../TextFile */ 197);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../utils/IPAddress */ 240);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../utils/helpers/compareArrays */ 241);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Abstract Base Class for any Server object\n */\n\n\n\n\n\n\n\nclass BaseServer {\n // Coding Contract files on this server\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n // Flag indicating whether the FTP port is open\n // Flag indicating whether player has admin/root access to this server\n // Hostname. Must be unique\n // Flag indicating whether HTTP Port is open\n // IP Address. Must be unique\n // Flag indicating whether player is curently connected to this server\n // RAM (GB) available on this server\n // Message files AND Literature files on this Server\n // For Literature files, this array contains only the filename (string)\n // For Messages, it contains the actual Message object\n // TODO Separate literature files into its own property\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n // Programs on this servers. Contains only the names of the programs\n // RAM (GB) used. i.e. unavailable RAM\n // RunningScript files on this server\n // Script files on this Server\n // Contains the IP Addresses of all servers that are immediately\n // reachable from this one\n // Flag indicating whether SMTP Port is open\n // Flag indicating whether SQL Port is open\n // Flag indicating whether the SSH Port is open\n // Text files on this server\n constructor(params = {\n hostname: \"\",\n ip: Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])()\n }) {\n _defineProperty(this, \"contracts\", []);\n\n _defineProperty(this, \"cpuCores\", 1);\n\n _defineProperty(this, \"ftpPortOpen\", false);\n\n _defineProperty(this, \"hasAdminRights\", false);\n\n _defineProperty(this, \"hostname\", \"\");\n\n _defineProperty(this, \"httpPortOpen\", false);\n\n _defineProperty(this, \"ip\", \"\");\n\n _defineProperty(this, \"isConnectedTo\", false);\n\n _defineProperty(this, \"maxRam\", 0);\n\n _defineProperty(this, \"messages\", []);\n\n _defineProperty(this, \"organizationName\", \"\");\n\n _defineProperty(this, \"programs\", []);\n\n _defineProperty(this, \"ramUsed\", 0);\n\n _defineProperty(this, \"runningScripts\", []);\n\n _defineProperty(this, \"scripts\", []);\n\n _defineProperty(this, \"serversOnNetwork\", []);\n\n _defineProperty(this, \"smtpPortOpen\", false);\n\n _defineProperty(this, \"sqlPortOpen\", false);\n\n _defineProperty(this, \"sshPortOpen\", false);\n\n _defineProperty(this, \"textFiles\", []);\n\n this.ip = params.ip ? params.ip : Object(_utils_IPAddress__WEBPACK_IMPORTED_MODULE_5__[/* createRandomIp */ \"a\"])();\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false; //Access information\n\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract) {\n this.contracts.push(contract);\n }\n\n getContract(contractName) {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n\n return null;\n }\n /**\n * Find an actively running script on this server\n * @param scriptName - Filename of script to search for\n * @param scriptArgs - Arguments that script is being run with\n * @returns RunningScript for the specified active script\n * Returns null if no such script can be found\n */\n\n\n getRunningScript(scriptName, scriptArgs) {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_6__[/* compareArrays */ \"a\"])(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n\n\n getScript(scriptName) {\n for (let i = 0; i < this.scripts.length; i++) {\n if (this.scripts[i].filename === scriptName) {\n return this.scripts[i];\n }\n }\n\n return null;\n }\n /**\n * Returns boolean indicating whether the given script is running on this server\n */\n\n\n isRunning(fn) {\n for (const runningScriptObj of this.runningScripts) {\n if (runningScriptObj.filename === fn) {\n return true;\n }\n }\n\n return false;\n }\n\n removeContract(contract) {\n if (contract instanceof _CodingContracts__WEBPACK_IMPORTED_MODULE_0__[/* CodingContract */ \"a\"]) {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract.fn;\n });\n } else {\n this.contracts = this.contracts.filter(c => {\n return c.fn !== contract;\n });\n }\n }\n /**\n * Remove a file from the server\n * @param fn {string} Name of file to be deleted\n * @returns {IReturnStatus} Return status object indicating whether or not file was deleted\n */\n\n\n removeFile(fn) {\n if (fn.endsWith(\".exe\") || fn.match(/^.+\\.exe-\\d+(?:\\.\\d*)?%-INC$/) != null) {\n for (let i = 0; i < this.programs.length; ++i) {\n if (this.programs[i] === fn) {\n this.programs.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n for (let i = 0; i < this.scripts.length; ++i) {\n if (this.scripts[i].filename === fn) {\n if (this.isRunning(fn)) {\n return {\n res: false,\n msg: \"Cannot delete a script that is currently running!\"\n };\n }\n\n this.scripts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".lit\")) {\n for (let i = 0; i < this.messages.length; ++i) {\n const f = this.messages[i];\n\n if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".txt\")) {\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n this.textFiles.splice(i, 1);\n return {\n res: true\n };\n }\n }\n } else if (fn.endsWith(\".cct\")) {\n for (let i = 0; i < this.contracts.length; ++i) {\n if (this.contracts[i].fn === fn) {\n this.contracts.splice(i, 1);\n return {\n res: true\n };\n }\n }\n }\n\n return {\n res: false,\n msg: \"No such file exists\"\n };\n }\n /**\n * Called when a script is run on this server.\n * All this function does is add a RunningScript object to the\n * `runningScripts` array. It does NOT check whether the script actually can\n * be run.\n */\n\n\n runScript(script) {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram) {\n this.maxRam = ram;\n }\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n\n\n writeToScriptFile(fn, code) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(fn)) {\n return ret;\n } // Check if the script already exists, and overwrite it if it does\n\n\n for (let i = 0; i < this.scripts.length; ++i) {\n if (fn === this.scripts[i].filename) {\n const script = this.scripts[i];\n script.code = code;\n script.updateRamUsage(this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n } // Otherwise, create a new script\n\n\n const newScript = new _Script_Script__WEBPACK_IMPORTED_MODULE_1__[/* Script */ \"a\"](fn, code, this.ip, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n } // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n\n\n writeToTextFile(fn, txt) {\n const ret = {\n success: false,\n overwritten: false\n };\n\n if (!Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isValidFilePath */ \"g\"])(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n } // Check if the text file already exists, and overwrite if it does\n\n\n for (let i = 0; i < this.textFiles.length; ++i) {\n if (this.textFiles[i].fn === fn) {\n ret.overwritten = true;\n this.textFiles[i].text = txt;\n ret.success = true;\n return ret;\n }\n } // Otherwise create a new text file\n\n\n const newFile = new _TextFile__WEBPACK_IMPORTED_MODULE_3__[/* TextFile */ \"a\"](fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Server/BaseServer.ts?"); /***/ }), -/* 432 */ +/* 433 */ /*!***************************************!*\ !*** ./src/Script/RamCalculations.js ***! \***************************************/ @@ -2861,10 +2873,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateRamUsage; });\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn-walk */ 317);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RamCalculationErrorCodes */ 230);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Netscript/RamCostGenerator */ 11);\n/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\n\n\n\n // These special strings are used to reference the presence of a given logical\n// construct within a user script.\n\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\"; // The global scope of a script is registered under this key during parsing.\n\nconst memCheckGlobalKey = \".__GLOBAL__\";\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\n\nasync function parseOnlyRamCalculate(otherScripts, code, workerScript) {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap = {}; // Scripts we've parsed.\n\n const completedParses = new Set(); // Scripts we've discovered that need to be parsed.\n\n const parseQueue = []; // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n\n function parseCode(code, moduleName) {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName); // Add any additional modules to the parse queue;\n\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n } // Splice all the references in\n\n\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n } // Parse the initial module, which is the \"main\" script that is being run\n\n\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule); // Process additional modules, which occurs if the \"main\" script has any imports\n\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift(); // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n\n let code;\n\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError;\n }\n\n let script = null;\n let fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n } // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n\n\n let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter(s => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift(); // Check if this is one of the special keys, and add the appropriate ram cost if so.\n\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptHacknetNodesRamCost;\n }\n\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n\n for (let ident of Object.keys(dependencyMap).filter(k => k.startsWith(prefix))) {\n for (let dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (let dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n } // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n\n\n try {\n function applyFuncRam(func) {\n if (typeof func === \"function\") {\n try {\n let res;\n\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n\n if (typeof res === \"number\") {\n return res;\n }\n\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\n } else {\n return 0;\n }\n } // Only count each function once\n\n\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n } // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n\n\n let func;\n\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n}\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\n\n\nfunction parseOnlyCalculateDeps(code, currentModule) {\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(code, {\n sourceType: \"module\",\n ecmaVersion: \"latest\"\n }); // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap = {};\n dependencyMap[globalKey] = new Set(); // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n\n let internalToExternal = {};\n var additionalModules = []; // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n\n function addRef(key, name) {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n\n if (name in internalToExternal) {\n s.add(internalToExternal[name]);\n }\n\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n } //A list of identifiers that resolve to \"native Javascript code\"\n\n\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype); // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n\n function commonVisitors() {\n return {\n Identifier: (node, st) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n\n addRef(st.key, node.name);\n },\n WhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node, st, walkDeeper) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n }\n };\n }\n\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](ast, {\n key: globalKey\n }, Object.assign({\n ImportDeclaration: (node, st) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName); // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n\n dependencyMap[st.key].add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n dependencyMap[st.key].add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: node => {\n const key = currentModule + \".\" + node.id.name;\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](node, {\n key: key\n }, commonVisitors());\n }\n }, commonVisitors()));\n return {\n dependencyMap: dependencyMap,\n additionalModules: additionalModules\n };\n}\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\n\n\nasync function calculateRamUsage(codeCopy, otherScripts) {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCosts */ \"b\"]\n }\n };\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n}\n\n//# sourceURL=webpack:///./src/Script/RamCalculations.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateRamUsage; });\n/* harmony import */ var acorn_walk__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn-walk */ 319);\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! acorn */ 176);\n/* harmony import */ var _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RamCalculationErrorCodes */ 230);\n/* harmony import */ var _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Netscript/RamCostGenerator */ 11);\n/**\n * Implements RAM Calculation functionality.\n *\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST, calculating RAM usage along\n * the way\n */\n\n\n\n // These special strings are used to reference the presence of a given logical\n// construct within a user script.\n\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\"; // The global scope of a script is registered under this key during parsing.\n\nconst memCheckGlobalKey = \".__GLOBAL__\";\n/**\n * Parses code into an AST and walks through it recursively to calculate\n * RAM usage. Also accounts for imported modules.\n * @param {Script[]} otherScripts - All other scripts on the server. Used to account for imported scripts\n * @param {string} codeCopy - The code being parsed\n * @param {WorkerScript} workerScript - Object containing RAM costs of Netscript functions. Also used to\n * keep track of what functions have/havent been accounted for\n */\n\nasync function parseOnlyRamCalculate(otherScripts, code, workerScript) {\n try {\n /**\n * Maps dependent identifiers to their dependencies.\n *\n * The initial identifier is __SPECIAL_INITIAL_MODULE__.__GLOBAL__.\n * It depends on all the functions declared in the module, all the global scopes\n * of its imports, and any identifiers referenced in this global scope. Each\n * function depends on all the identifiers referenced internally.\n * We walk the dependency graph to calculate RAM usage, given that some identifiers\n * reference Netscript functions which have a RAM cost.\n */\n let dependencyMap = {}; // Scripts we've parsed.\n\n const completedParses = new Set(); // Scripts we've discovered that need to be parsed.\n\n const parseQueue = []; // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n\n function parseCode(code, moduleName) {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName); // Add any additional modules to the parse queue;\n\n for (let i = 0; i < result.additionalModules.length; ++i) {\n if (!completedParses.has(result.additionalModules[i])) {\n parseQueue.push(result.additionalModules[i]);\n }\n } // Splice all the references in\n\n\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n } // Parse the initial module, which is the \"main\" script that is being run\n\n\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule); // Process additional modules, which occurs if the \"main\" script has any imports\n\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift(); // Additional modules can either be imported from the web (in which case we use\n // a dynamic import), or from other in-game scripts\n\n let code;\n\n if (nextModule.startsWith(\"https://\") || nextModule.startsWith(\"http://\")) {\n try {\n // eslint-disable-next-line no-await-in-loop\n const module = await eval(\"import(nextModule)\");\n code = \"\";\n\n for (const prop in module) {\n if (typeof module[prop] === \"function\") {\n code += module[prop].toString() + \";\\n\";\n }\n }\n } catch (e) {\n console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].URLImportError;\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError;\n }\n\n let script = null;\n let fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n\n for (const s of otherScripts) {\n if (s.filename === fn) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].ImportError; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n } // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan\n // are those that start with __SPECIAL_INITIAL_MODULE__.\n\n\n let ram = _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptBaseRamCost;\n const unresolvedRefs = Object.keys(dependencyMap).filter(s => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift(); // Check if this is one of the special keys, and add the appropriate ram cost if so.\n\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptHacknetNodesRamCost;\n }\n\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCostConstants */ \"a\"].ScriptDomRamCost;\n }\n\n resolvedRefs.add(ref);\n\n if (ref.endsWith(\".*\")) {\n // A prefix reference. We need to find all matching identifiers.\n const prefix = ref.slice(0, ref.length - 2);\n\n for (let ident of Object.keys(dependencyMap).filter(k => k.startsWith(prefix))) {\n for (let dep of dependencyMap[ident] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\n } else {\n // An exact reference. Add all dependencies of this ref.\n for (let dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n } // Check if this identifier is a function in the workerScript environment.\n // If it is, then we need to get its RAM cost.\n\n\n try {\n function applyFuncRam(func) {\n if (typeof func === \"function\") {\n try {\n let res;\n\n if (func.constructor.name === \"AsyncFunction\") {\n res = 0; // Async functions will always be 0 RAM\n } else {\n res = func.apply(null, []);\n }\n\n if (typeof res === \"number\") {\n return res;\n }\n\n return 0;\n } catch (e) {\n console.error(`Error applying function: ${e}`);\n return 0;\n }\n } else {\n return 0;\n }\n } // Only count each function once\n\n\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n } // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n\n\n let func;\n\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n } else {\n func = workerScript.env.vars[ref];\n }\n\n ram += applyFuncRam(func);\n } catch (error) {\n continue;\n }\n }\n\n return ram;\n } catch (error) {\n // console.info(\"parse or eval error: \", error);\n // This is not unexpected. The user may be editing a script, and it may be in\n // a transitory invalid state.\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n}\n/**\n * Helper function that parses a single script. It returns a map of all dependencies,\n * which are items in the code's AST that potentially need to be evaluated\n * for RAM usage calculations. It also returns an array of additional modules\n * that need to be parsed (i.e. are 'import'ed scripts).\n */\n\n\nfunction parseOnlyCalculateDeps(code, currentModule) {\n const ast = Object(acorn__WEBPACK_IMPORTED_MODULE_1__[/* parse */ \"b\"])(code, {\n sourceType: \"module\",\n ecmaVersion: \"latest\"\n }); // Everything from the global scope goes in \".\". Everything else goes in \".function\", where only\n // the outermost layer of functions counts.\n\n const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap = {};\n dependencyMap[globalKey] = new Set(); // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n\n let internalToExternal = {};\n var additionalModules = []; // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n\n function addRef(key, name) {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n\n if (name in internalToExternal) {\n s.add(internalToExternal[name]);\n }\n\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n } //A list of identifiers that resolve to \"native Javascript code\"\n\n\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype); // If we discover a dependency identifier, state.key is the dependent identifier.\n // walkDeeper is for doing recursive walks of expressions in composites that we handle.\n\n function commonVisitors() {\n return {\n Identifier: (node, st) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n\n addRef(st.key, node.name);\n },\n WhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceFOR);\n node.init && walkDeeper(node.init, st);\n node.test && walkDeeper(node.test, st);\n node.update && walkDeeper(node.update, st);\n node.body && walkDeeper(node.body, st);\n },\n IfStatement: (node, st, walkDeeper) => {\n addRef(st.key, specialReferenceIF);\n node.test && walkDeeper(node.test, st);\n node.consequent && walkDeeper(node.consequent, st);\n node.alternate && walkDeeper(node.alternate, st);\n },\n MemberExpression: (node, st, walkDeeper) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n }\n };\n }\n\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](ast, {\n key: globalKey\n }, Object.assign({\n ImportDeclaration: (node, st) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName); // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n\n dependencyMap[st.key].add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\n\n if (spec.imported !== undefined && spec.local !== undefined) {\n // We depend on specific things.\n internalToExternal[spec.local.name] = importModuleName + \".\" + spec.imported.name;\n } else {\n // We depend on everything.\n dependencyMap[st.key].add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: node => {\n const key = currentModule + \".\" + node.id.name;\n acorn_walk__WEBPACK_IMPORTED_MODULE_0__[/* recursive */ \"a\"](node, {\n key: key\n }, commonVisitors());\n }\n }, commonVisitors()));\n return {\n dependencyMap: dependencyMap,\n additionalModules: additionalModules\n };\n}\n/**\n * Calculate's a scripts RAM Usage\n * @param {string} codeCopy - The script's code\n * @param {Script[]} otherScripts - All other scripts on the server.\n * Used to account for imported scripts\n */\n\n\nasync function calculateRamUsage(codeCopy, otherScripts) {\n // We don't need a real WorkerScript for this. Just an object that keeps\n // track of whatever's needed for RAM calculations\n const workerScript = {\n loadedFns: {},\n env: {\n vars: _Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__[/* RamCosts */ \"b\"]\n }\n };\n\n try {\n return await parseOnlyRamCalculate(otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n }\n\n return _RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__[/* RamCalculationErrorCode */ \"a\"].SyntaxError;\n}\n\n//# sourceURL=webpack:///./src/Script/RamCalculations.js?"); /***/ }), -/* 433 */ +/* 434 */ /*!*************************************!*\ !*** ./src/Server/formulas/grow.ts ***! \*************************************/ @@ -2876,7 +2888,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return calculateServerGrowth; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\nfunction calculateServerGrowth(server, threads, p, cores = 1) {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0); //Get adjusted growth rate, which accounts for server security\n\n const growthRate = _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n\n if (adjGrowthRate > _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate) {\n adjGrowthRate = _Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].ServerMaxGrowthRate;\n } //Calculate adjusted server growth rate based on parameters\n\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted = numServerGrowthCycles * serverGrowthPercentage * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_1__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate; //Apply serverGrowth for the calculated number of growth cycles\n\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n\n//# sourceURL=webpack:///./src/Server/formulas/grow.ts?"); /***/ }), -/* 434 */ +/* 435 */ /*!*******************************************!*\ !*** ./utils/helpers/isValidIPAddress.ts ***! \*******************************************/ @@ -2888,7 +2900,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isValidIPAddress; });\n/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nfunction isValidIPAddress(ipaddress) {\n const byteRange = \"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\";\n const regexStr = `^${byteRange}\\.${byteRange}\\.${byteRange}\\.${byteRange}$`;\n const ipAddressRegex = new RegExp(regexStr);\n return ipAddressRegex.test(ipaddress);\n}\n\n//# sourceURL=webpack:///./utils/helpers/isValidIPAddress.ts?"); /***/ }), -/* 435 */ +/* 436 */ /*!****************************************!*\ !*** ./utils/uiHelpers/createPopup.ts ***! \****************************************/ @@ -2897,11 +2909,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony import */ var _createElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createElement */ 113);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 209);\n\n\n\n/**\n * Creates the necessary DOM elements to present an in-game popup to the player.\n * @param id The (hopefully) unique identifier for the popup container.\n * @param elems The collection of HTML Elements to show within the popup.\n */\nfunction createPopup(id, elems, options = {}) {\n const container = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id\n });\n const content = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-content\",\n id: `${id}-content`\n });\n\n for (const elem of elems) {\n content.appendChild(elem);\n } // Configurable Options\n\n\n if (options.backgroundColor) {\n content.style.backgroundColor = options.backgroundColor;\n }\n\n container.appendChild(content);\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"entire-game-container\").appendChild(container);\n return container;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/createPopup.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createPopup; });\n/* harmony import */ var _createElement__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./createElement */ 113);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 210);\n\n\n\n/**\n * Creates the necessary DOM elements to present an in-game popup to the player.\n * @param id The (hopefully) unique identifier for the popup container.\n * @param elems The collection of HTML Elements to show within the popup.\n */\nfunction createPopup(id, elems, options = {}) {\n const container = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-container\",\n display: \"flex\",\n id: id\n });\n const content = Object(_createElement__WEBPACK_IMPORTED_MODULE_0__[/* createElement */ \"a\"])(\"div\", {\n class: \"popup-box-content\",\n id: `${id}-content`\n });\n\n for (const elem of elems) {\n content.appendChild(elem);\n } // Configurable Options\n\n\n if (options.backgroundColor) {\n content.style.backgroundColor = options.backgroundColor;\n }\n\n container.appendChild(content);\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"entire-game-container\").appendChild(container);\n return container;\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/createPopup.ts?"); /***/ }), -/* 436 */, -/* 437 */ +/* 437 */, +/* 438 */ /*!********************************************!*\ !*** ./src/Script/RunningScriptHelpers.ts ***! \********************************************/ @@ -2913,7 +2925,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getRamUsageFromRunningScript; });\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\nfunction getRamUsageFromRunningScript(script) {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_0__[/* AllServers */ \"b\"][script.server];\n\n if (server == null) {\n return 0;\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === script.filename) {\n // Cache the ram usage for the next call\n script.ramUsage = server.scripts[i].ramUsage;\n return script.ramUsage;\n }\n }\n\n return 0;\n}\n\n//# sourceURL=webpack:///./src/Script/RunningScriptHelpers.ts?"); /***/ }), -/* 438 */ +/* 439 */ /*!***************************************!*\ !*** ./utils/helpers/getTimestamp.ts ***! \***************************************/ @@ -2925,7 +2937,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getTimestamp; });\n/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nfunction getTimestamp() {\n const d = new Date(); // A negative slice value takes from the end of the string rather than the beginning.\n\n const stringWidth = -2;\n const formattedHours = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes = `0${d.getMinutes()}`.slice(stringWidth);\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}`;\n}\n\n//# sourceURL=webpack:///./utils/helpers/getTimestamp.ts?"); /***/ }), -/* 439 */ +/* 440 */ /*!******************************!*\ !*** ./src/JSInterpreter.js ***! \******************************/ @@ -2937,7 +2949,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Interpreter; });\n/* harmony import */ var acorn__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! acorn */ 176);\n\n/**\n * @license\n * JavaScript Interpreter\n *\n * Copyright 2013 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * @fileoverview Interpreting JavaScript in JavaScript.\n * @author fraser@google.com (Neil Fraser)\n */\n\n\"use strict\";\n/**\n * Create a new interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n * @param {Function=} opt_initFunc Optional initialization function. Used to\n * define APIs. When called it is passed the interpreter object and the\n * global scope object.\n * @param {Number} Bitburner-specific number used for determining exception line numbers\n * @constructor\n */\n\n\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n\n if (typeof code === \"string\") {\n code = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code, Interpreter.PARSE_OPTIONS);\n }\n\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = []; // Unique identifier for native functions. Used in serialization.\n\n this.functionCounter_ = 0; // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\n\n for (var methodName in this) {\n if (typeof this[methodName] === \"function\" && (m = methodName.match(stepMatch))) {\n this.stepFunctions_[m[1]] = this[methodName].bind(this);\n }\n } // Create and initialize the global scope.\n\n\n this.global = this.createScope(this.ast, null); // Run the polyfills.\n\n this.ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\n\n this.stripLocations_(this.ast, undefined, undefined);\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack = [state];\n this.run();\n this.value = undefined; // Point at the main program.\n\n this.ast = code;\n var state = new Interpreter.State(this.ast, this.global);\n state.done = false;\n this.stateStack.length = 0;\n this.stateStack[0] = state; // Get a handle on Acorn's node_t object. It's tricky to access.\n\n this.nodeConstructor = state.node.constructor; // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n\n this[\"stateStack\"] = this.stateStack;\n};\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\n\n\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true\n};\n/**\n * Property descriptor of readonly properties.\n */\n\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false\n};\n/**\n * Property descriptor of non-enumerable properties.\n */\n\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true\n};\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\n\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false\n};\n/**\n * Property descriptor of variables.\n */\n\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true\n};\n/**\n * Unique symbol for indicating that a step has encountered an error, has\n * added it to the stack, and will be thrown within the user's program.\n * When STEP_ERROR is thrown in the JS-Interpreter, the error can be ignored.\n */\n\nInterpreter.STEP_ERROR = {};\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\n\nInterpreter.SCOPE_REFERENCE = {};\n/**\n * Unique symbol for indicating, when used as the value of the value\n * parameter in calls to setProperty and friends, that the value\n * should be taken from the property descriptor instead.\n */\n\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n/**\n * For cycle detection in array to string and error conversion;\n * see spec bug github.com/tc39/ecma262/issues/289\n * Since this is for atomic actions only, it can be a class property.\n */\n\nInterpreter.toStringCycles_ = [];\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\n\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n\n if (node == null || node.start == null) {\n return NaN;\n }\n\n try {\n code = code.substring(0, node.start);\n return (code.match(/\\n/g) || []).length + 1 - this.sourceCodeLineOffset;\n } catch (e) {\n return NaN;\n }\n};\n/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\n */\n\n\nInterpreter.prototype.getErrorLineNumberMessage = function (lineNumber) {\n if (isNaN(lineNumber)) {\n return \" (Unknown line number)\";\n } else if (lineNumber <= 0) {\n return \" (Error occurred in an imported function)\";\n } else {\n return \" (Line Number \" + lineNumber + \". This line number is probably incorrect \" + \"if your script is importing any functions. This is being worked on)\";\n }\n};\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\n\n\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n\n if (typeof code === \"string\") {\n code = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code, Interpreter.PARSE_OPTIONS);\n }\n\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n\n this.populateScope_(code, state.scope); // Append the new program to the old one.\n\n for (var i = 0, node; node = code[\"body\"][i]; i++) {\n state.node[\"body\"].push(node);\n }\n\n state.done = false;\n};\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\n\n\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n\n if (!state) {\n return false;\n }\n\n var node = state.node,\n type = node[\"type\"];\n\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\n }\n\n try {\n var nextState = this.stepFunctions_[type](stack, state, node);\n } catch (e) {\n // Eat any step errors. They have been thrown on the stack.\n if (e !== Interpreter.STEP_ERROR) {\n // Uh oh. This is a real error in the JS-Interpreter. Rethrow.\n throw e;\n }\n }\n\n if (nextState) {\n stack.push(nextState);\n }\n\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n\n return true;\n};\n/**\n * Execute the interpreter to program completion. Vulnerable to infinite loops.\n * @return {boolean} True if a execution is asynchronously blocked,\n * false if no more instructions.\n */\n\n\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n\n return this.paused_;\n};\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initGlobalScope = function (scope) {\n // Initialize uneditable global properties.\n this.setProperty(scope, \"NaN\", NaN, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"Infinity\", Infinity, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"undefined\", undefined, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"window\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"this\", scope, Interpreter.READONLY_DESCRIPTOR);\n this.setProperty(scope, \"self\", scope); // Editable.\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO); // Initialize global objects.\n\n this.initFunction(scope);\n this.initObject(scope); // Unable to set scope's parent prior (OBJECT did not exist).\n // Note that in a browser this would be 'Window', whereas in Node.js it would\n // be 'Object'. This interpreter is closer to Node in that it has no DOM.\n\n scope.proto = this.OBJECT_PROTO;\n this.setProperty(scope, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.initArray(scope);\n this.initString(scope);\n this.initBoolean(scope);\n this.initNumber(scope);\n this.initDate(scope);\n this.initRegExp(scope);\n this.initError(scope);\n this.initMath(scope);\n this.initJSON(scope); // Initialize global functions.\n\n var thisInterpreter = this;\n var func = this.createNativeFunction(function (x) {\n throw EvalError(\"Can't happen\");\n }, false);\n func.eval = true;\n this.setProperty(scope, \"eval\", func);\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n var strFunctions = [[escape, \"escape\"], [unescape, \"unescape\"], [decodeURI, \"decodeURI\"], [decodeURIComponent, \"decodeURIComponent\"], [encodeURI, \"encodeURI\"], [encodeURIComponent, \"encodeURIComponent\"]];\n\n for (var i = 0; i < strFunctions.length; i++) {\n var wrapper = function (nativeFunc) {\n return function (str) {\n try {\n return nativeFunc(str);\n } catch (e) {\n // decodeURI('%xy') will throw an error. Catch and rethrow.\n thisInterpreter.throwException(thisInterpreter.URI_ERROR, e.message);\n }\n };\n }(strFunctions[i][0]);\n\n this.setProperty(scope, strFunctions[i][1], this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n } // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n\n\n this[\"OBJECT\"] = this.OBJECT;\n this[\"OBJECT_PROTO\"] = this.OBJECT_PROTO;\n this[\"FUNCTION\"] = this.FUNCTION;\n this[\"FUNCTION_PROTO\"] = this.FUNCTION_PROTO;\n this[\"ARRAY\"] = this.ARRAY;\n this[\"ARRAY_PROTO\"] = this.ARRAY_PROTO;\n this[\"REGEXP\"] = this.REGEXP;\n this[\"REGEXP_PROTO\"] = this.REGEXP_PROTO;\n this[\"DATE\"] = this.DATE;\n this[\"DATE_PROTO\"] = this.DATE_PROTO; // The following properties are obsolete. Do not use.\n\n this[\"UNDEFINED\"] = undefined;\n this[\"NULL\"] = null;\n this[\"NAN\"] = NaN;\n this[\"TRUE\"] = true;\n this[\"FALSE\"] = false;\n this[\"STRING_EMPTY\"] = \"\";\n this[\"NUMBER_ZERO\"] = 0;\n this[\"NUMBER_ONE\"] = 1; // Run any user-provided initialization.\n\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/; // Function constructor.\n\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Function().\n var newFunc = this;\n } else {\n // Called as Function().\n var newFunc = thisInterpreter.createObjectProto(thisInterpreter.FUNCTION_PROTO);\n }\n\n if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n\n argsStr = args.join(\", \");\n } // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n\n\n newFunc.parentScope = thisInterpreter.global; // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n\n try {\n var ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](\"(function(\" + argsStr + \") {\" + code + \"})\", Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code: \" + e.message);\n }\n\n if (ast[\"body\"].length !== 1) {\n // Function('a', 'return a + 6;}; {alert(1);');\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid code in function body.\");\n }\n\n newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n this.setProperty(scope, \"Function\", this.FUNCTION); // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper; // Configure Function.prototype.\n\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.FUNCTION_PROTO.nativeFunc = function () {};\n\n this.FUNCTION_PROTO.nativeFunc.id = this.functionCounter_++;\n this.setProperty(this.FUNCTION_PROTO, \"length\", 0, Interpreter.READONLY_DESCRIPTOR);\n\n var boxThis = function (value) {\n // In non-strict mode 'this' must be an object.\n if ((!value || !value.isObject) && !thisInterpreter.getScope().strict) {\n if (value === undefined || value === null) {\n // 'Undefined' and 'null' are changed to global object.\n value = thisInterpreter.global;\n } else {\n // Primitives must be boxed in non-strict mode.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n value = box;\n }\n }\n\n return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1]; // Rewrite the current 'CallExpression' to apply a different function.\n\n state.func_ = this; // Assign the 'this' object.\n\n state.funcThis_ = boxThis(thisArg); // Bind any provided arguments.\n\n state.arguments_ = [];\n\n if (args !== null && args !== undefined) {\n if (args.isObject) {\n state.arguments_ = thisInterpreter.arrayPseudoToNative(args);\n } else {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"CreateListFromArrayLike called on non-object\");\n }\n }\n\n state.doneExec_ = false;\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg\n /*, var_args */\n ) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1]; // Rewrite the current 'CallExpression' to call a different function.\n\n state.func_ = this; // Assign the 'this' object.\n\n state.funcThis_ = boxThis(thisArg); // Bind any provided arguments.\n\n state.arguments_ = [];\n\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n\n state.doneExec_ = false;\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n this.polyfills_.push( // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\", \"{configurable: true, writable: true, value:\", \"function(oThis) {\", \"if (typeof this !== 'function') {\", \"throw TypeError('What is trying to be bound is not callable');\", \"}\", \"var aArgs = Array.prototype.slice.call(arguments, 1),\", \"fToBind = this,\", \"fNOP = function() {},\", \"fBound = function() {\", \"return fToBind.apply(this instanceof fNOP\", \"? this\", \": oThis,\", \"aArgs.concat(Array.prototype.slice.call(arguments)));\", \"};\", \"if (this.prototype) {\", \"fNOP.prototype = this.prototype;\", \"}\", \"fBound.prototype = new fNOP();\", \"return fBound;\", \"}\", \"});\", \"\"); // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n\n wrapper = function () {\n return this.toString();\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(this.FUNCTION, \"toString\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function () {\n return this.valueOf();\n };\n\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(this.FUNCTION, \"valueOf\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Object constructor.\n\n wrapper = function (value) {\n if (value === undefined || value === null) {\n // Create a new object.\n if (thisInterpreter.calledWithNew()) {\n // Called as new Object().\n return this;\n } else {\n // Called as Object().\n return thisInterpreter.createObjectProto(thisInterpreter.OBJECT_PROTO);\n }\n }\n\n if (!value.isObject) {\n // Wrap the value as an object.\n var box = thisInterpreter.createObjectProto(thisInterpreter.getPrototype(value));\n box.data = value;\n return box;\n } // Return the provided object.\n\n\n return value;\n };\n\n this.OBJECT = this.createNativeFunction(wrapper, true); // Throw away the created prototype and use the root prototype.\n\n this.setProperty(this.OBJECT, \"prototype\", this.OBJECT_PROTO);\n this.setProperty(this.OBJECT_PROTO, \"constructor\", this.OBJECT, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(scope, \"Object\", this.OBJECT);\n /**\n * Checks if the provided value is null or undefined.\n * If so, then throw an error in the call stack.\n * @param {Interpreter.Value} value Value to check.\n */\n\n var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n }; // Static methods on Object.\n\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n\n this.setProperty(this.OBJECT, \"getOwnPropertyNames\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n\n if (obj.isObject) {\n obj = obj.properties;\n }\n\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n\n this.setProperty(this.OBJECT, \"keys\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (proto) {\n // Support for the second argument is the responsibility of a polyfill.\n if (proto === null) {\n return thisInterpreter.createObjectProto(null);\n }\n\n if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n\n return thisInterpreter.createObjectProto(proto);\n };\n\n this.setProperty(this.OBJECT, \"create\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Add a polyfill to handle create's second argument.\n\n this.polyfills_.push(\"(function() {\", \"var create_ = Object.create;\", \"Object.create = function(proto, props) {\", \"var obj = create_(proto);\", \"props && Object.defineProperties(obj, props);\", \"return obj;\", \"};\", \"})();\", \"\");\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Can't define property '\" + prop + \"', object is not extensible\");\n } // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n\n\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n\n this.setProperty(this.OBJECT, \"defineProperty\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.polyfills_.push( // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\", \"var defineProperty_ = Object.defineProperty;\", \"Object.defineProperty = function(obj, prop, d1) {\", \"var d2 = {};\", \"if ('configurable' in d1) d2.configurable = d1.configurable;\", \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\", \"if ('writable' in d1) d2.writable = d1.writable;\", \"if ('value' in d1) d2.value = d1.value;\", \"if ('get' in d1) d2.get = d1.get;\", \"if ('set' in d1) d2.set = d1.set;\", \"return defineProperty_(obj, prop, d2);\", \"};\", \"})();\", \"Object.defineProperty(Object, 'defineProperties',\", \"{configurable: true, writable: true, value:\", \"function(obj, props) {\", \"var keys = Object.keys(props);\", \"for (var i = 0; i < keys.length; i++) {\", \"Object.defineProperty(obj, keys[i], props[keys[i]]);\", \"}\", \"return obj;\", \"}\", \"});\", \"\");\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.getOwnPropertyDescriptor called on non-object\");\n }\n\n prop = String(prop);\n\n if (!(prop in obj.properties)) {\n return undefined;\n }\n\n var descriptor = Object.getOwnPropertyDescriptor(obj.properties, prop);\n var getter = obj.getter[prop];\n var setter = obj.setter[prop];\n\n if (getter || setter) {\n descriptor.get = getter;\n descriptor.set = setter;\n delete descriptor.value;\n delete descriptor.writable;\n } // Preserve value, but remove it for the nativeToPseudo call.\n\n\n var value = descriptor.value;\n var hasValue = (\"value\" in descriptor);\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n\n return pseudoDescriptor;\n };\n\n this.setProperty(this.OBJECT, \"getOwnPropertyDescriptor\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n\n this.setProperty(this.OBJECT, \"getPrototypeOf\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n\n this.setProperty(this.OBJECT, \"isExtensible\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n\n return obj;\n };\n\n this.setProperty(this.OBJECT, \"preventExtensions\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Object.\n\n this.setNativeFunctionPrototype(this.OBJECT, \"toString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"toLocaleString\", Interpreter.Object.prototype.toString);\n this.setNativeFunctionPrototype(this.OBJECT, \"valueOf\", Interpreter.Object.prototype.valueOf);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n\n if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n\n return String(prop) in this.properties;\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"propertyIsEnumerable\", wrapper);\n\n wrapper = function (obj) {\n while (true) {\n // Note, circular loops shouldn't be possible.\n obj = thisInterpreter.getPrototype(obj);\n\n if (!obj) {\n // No parent; reached the top.\n return false;\n }\n\n if (obj === this) {\n return true;\n }\n }\n };\n\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Array constructor.\n\n wrapper = function (var_args) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Array().\n var newArray = this;\n } else {\n // Called as Array().\n var newArray = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n }\n\n var first = arguments[0];\n\n if (arguments.length === 1 && typeof first === \"number\") {\n if (isNaN(Interpreter.legalArrayLength(first))) {\n thisInterpreter.throwException(thisInterpreter.RANGE_ERROR, \"Invalid array length\");\n }\n\n newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n\n newArray.properties.length = i;\n }\n\n return newArray;\n };\n\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY); // Static methods on Array.\n\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n\n this.setProperty(this.ARRAY, \"isArray\", this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Array.\n\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"pop\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.push.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"shift\", wrapper);\n\n wrapper = function (var_args) {\n return Array.prototype.unshift.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany\n /*, var_args*/\n ) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"splice\", wrapper);\n\n wrapper = function (opt_begin, opt_end) {\n var list = Array.prototype.slice.call(this.properties, opt_begin, opt_end);\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0; // Start by copying the current array.\n\n var iLength = thisInterpreter.getProperty(this, \"length\");\n\n for (var i = 0; i < iLength; i++) {\n if (thisInterpreter.hasProperty(this, i)) {\n var element = thisInterpreter.getProperty(this, i);\n list[length] = element;\n }\n\n length++;\n } // Loop through all arguments and copy them in.\n\n\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n\n return thisInterpreter.arrayNativeToPseudo(list);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"concat\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.indexOf.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n this.polyfills_.push( // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\", \"{configurable: true, writable: true, value:\", \"function(callbackfn, thisArg) {\", \"if (!this || typeof callbackfn !== 'function') throw TypeError();\", \"var T, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"k = 0;\", \"while (k < len) {\", \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\", \"k++;\", \"}\", \"return true;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\", \"{configurable: true, writable: true, value:\", \"function(fun/*, thisArg*/) {\", \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\", \"var t = Object(this);\", \"var len = t.length >>> 0;\", \"var res = [];\", \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\", \"for (var i = 0; i < len; i++) {\", \"if (i in t) {\", \"var val = t[i];\", \"if (fun.call(thisArg, val, i, t)) res.push(val);\", \"}\", \"}\", \"return res;\", \"}\", \"});\", // Polyfill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.find\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find\n \"if (!Array.prototype.find) {\", \"Object.defineProperty(Array.prototype, 'find', {\", \"value: function(predicate) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"var o = Object(this);\", \"var len = o.length >>> 0;\", \"if (typeof predicate !== 'function') {\", \"throw new TypeError('predicate must be a function');\", \"}\", \"var thisArg = arguments[1];\", \"var k = 0;\", \"while (k < len) {\", \"var kValue = o[k];\", \"if (predicate.call(thisArg, kValue, k, o)) {\", \"return kValue;\", \"}\", \"k++;\", \"}\", \"return undefined;\", \"},\", \"configurable: true,\", \"writable: true\", \"});\", \"}\", // Poly fill copied from:\n // https://tc39.github.io/ecma262/#sec-array.prototype.findIndex\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex\n \"if (!Array.prototype.findIndex) {\", \"Object.defineProperty(Array.prototype, 'findIndex', {\", \"value: function(predicate) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"var o = Object(this);\", \"var len = o.length >>> 0;\", \"if (typeof predicate !== 'function') {\", \"throw new TypeError('predicate must be a function');\", \"}\", \"var thisArg = arguments[1];\", \"var k = 0;\", \"while (k < len) {\", \"var kValue = o[k];\", \"if (predicate.call(thisArg, kValue, k, o)) {\", \"return k;\", \"}\", \"k++;\", \"}\", \"return -1;\", \"},\", \"configurable: true,\", \"writable: true\", \"});\", \"}\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\", \"{configurable: true, writable: true, value:\", \"function(callback, thisArg) {\", \"if (!this || typeof callback !== 'function') throw TypeError();\", \"var T, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"k = 0;\", \"while (k < len) {\", \"if (k in O) callback.call(T, O[k], k, O);\", \"k++;\", \"}\", \"}\", \"});\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/includes#Polyfill\n \"Object.defineProperty(Array.prototype, 'includes', {\", \"value: function(searchElement, fromIndex) {\", \"if (this == null) {\", \"throw new TypeError('\\\"this\\\" is null or not defined');\", \"}\", \"// 1. Let O be ? ToObject(this value).\", \"var o = Object(this);\", '// 2. Let len be ? ToLength(? Get(O, \"length\")).', \"var len = o.length >>> 0;\", \"// 3. If len is 0, return false.\", \"if (len === 0) {\", \"return false;\", \"}\", \"// 4. Let n be ? ToInteger(fromIndex).\", \"// (If fromIndex is undefined, this step produces the value 0.)\", \"var n = fromIndex | 0;\", \"// 5. If n ≥ 0, then\", \"// a. Let k be n.\", \"// 6. Else n < 0,\", \"// a. Let k be len + n.\", \"// b. If k < 0, let k be 0.\", \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\", \"function sameValueZero(x, y) {\", \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\", \"}\", \"// 7. Repeat, while k < len\", \"while (k < len) {\", \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\", \"// b. If SameValueZero(searchElement, elementK) is true, return true.\", \"if (sameValueZero(o[k], searchElement)) {\", \"return true;\", \"}\", \"// c. Increase k by 1. \", \"k++;\", \"}\", \"// 8. Return false\", \"return false;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\", \"{configurable: true, writable: true, value:\", \"function(callback, thisArg) {\", \"if (!this || typeof callback !== 'function') new TypeError;\", \"var T, A, k;\", \"var O = Object(this);\", \"var len = O.length >>> 0;\", \"if (arguments.length > 1) T = thisArg;\", \"A = new Array(len);\", \"k = 0;\", \"while (k < len) {\", \"if (k in O) A[k] = callback.call(T, O[k], k, O);\", \"k++;\", \"}\", \"return A;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\", \"{configurable: true, writable: true, value:\", \"function(callback /*, initialValue*/) {\", \"if (!this || typeof callback !== 'function') throw TypeError();\", \"var t = Object(this), len = t.length >>> 0, k = 0, value;\", \"if (arguments.length === 2) {\", \"value = arguments[1];\", \"} else {\", \"while (k < len && !(k in t)) k++;\", \"if (k >= len) {\", \"throw TypeError('Reduce of empty array with no initial value');\", \"}\", \"value = t[k++];\", \"}\", \"for (; k < len; k++) {\", \"if (k in t) value = callback(value, t[k], k, t);\", \"}\", \"return value;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\", \"{configurable: true, writable: true, value:\", \"function(callback /*, initialValue*/) {\", \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\", \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\", \"if (arguments.length >= 2) {\", \"value = arguments[1];\", \"} else {\", \"while (k >= 0 && !(k in t)) k--;\", \"if (k < 0) {\", \"throw TypeError('Reduce of empty array with no initial value');\", \"}\", \"value = t[k--];\", \"}\", \"for (; k >= 0; k--) {\", \"if (k in t) value = callback(value, t[k], k, t);\", \"}\", \"return value;\", \"}\", \"});\", // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\", \"{configurable: true, writable: true, value:\", \"function(fun/*, thisArg*/) {\", \"if (!this || typeof fun !== 'function') throw TypeError();\", \"var t = Object(this);\", \"var len = t.length >>> 0;\", \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\", \"for (var i = 0; i < len; i++) {\", \"if (i in t && fun.call(thisArg, t[i], i, t)) {\", \"return true;\", \"}\", \"}\", \"return false;\", \"}\", \"});\", \"(function() {\", \"var sort_ = Array.prototype.sort;\", \"Array.prototype.sort = function(opt_comp) {\", // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\", \"return sort_.call(this);\", \"}\", // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\", \"var changes = 0;\", \"for (var j = 0; j < this.length - i - 1; j++) {\", \"if (opt_comp(this[j], this[j + 1]) > 0) {\", \"var swap = this[j];\", \"this[j] = this[j + 1];\", \"this[j + 1] = swap;\", \"changes++;\", \"}\", \"}\", \"if (!changes) break;\", \"}\", \"return this;\", \"};\", \"})();\", \"Object.defineProperty(Array.prototype, 'toLocaleString',\", \"{configurable: true, writable: true, value:\", \"function() {\", \"var out = [];\", \"for (var i = 0; i < this.length; i++) {\", \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\", \"}\", \"return out.join(',');\", \"}\", \"});\", \"\");\n};\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper; // String constructor.\n\n wrapper = function (value) {\n value = String(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new String().\n this.data = value;\n return this;\n } else {\n // Called as String().\n return value;\n }\n };\n\n this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING); // Static methods on String.\n\n this.setProperty(this.STRING, \"fromCharCode\", this.createNativeFunction(String.fromCharCode, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on String.\n // Methods with exclusively primitive arguments.\n\n var functions = [\"charAt\", \"charCodeAt\", \"concat\", \"indexOf\", \"lastIndexOf\", \"slice\", \"substr\", \"substring\", \"toLocaleLowerCase\", \"toLocaleUpperCase\", \"toLowerCase\", \"toUpperCase\", \"trim\"];\n\n for (var i = 0; i < functions.length; i++) {\n this.setNativeFunctionPrototype(this.STRING, functions[i], String.prototype[functions[i]]);\n }\n\n wrapper = function (compareString, locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return String(this).localeCompare(compareString, locales, options);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"localeCompare\", wrapper);\n\n wrapper = function (separator, limit) {\n if (thisInterpreter.isa(separator, thisInterpreter.REGEXP)) {\n separator = separator.data;\n }\n\n var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"split\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n\n var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"match\", wrapper);\n\n wrapper = function (regexp) {\n if (thisInterpreter.isa(regexp, thisInterpreter.REGEXP)) {\n regexp = regexp.data;\n }\n\n return String(this).search(regexp);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"search\", wrapper);\n\n wrapper = function (substr, newSubstr) {\n // Support for function replacements is the responsibility of a polyfill.\n if (thisInterpreter.isa(substr, thisInterpreter.REGEXP)) {\n substr = substr.data;\n }\n\n return String(this).replace(substr, newSubstr);\n };\n\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper); // Add a polyfill to handle replace's second argument being a function.\n\n this.polyfills_.push(\"(function() {\", \"var replace_ = String.prototype.replace;\", \"String.prototype.replace = function(substr, newSubstr) {\", \"if (typeof newSubstr !== 'function') {\", // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\", \"}\", \"var str = this;\", \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\", \"var m = substr.exec(str);\", \"while (m) {\", \"m.push(m.index, str);\", \"var inject = newSubstr.apply(null, m);\", \"subs.push([m.index, m[0].length, inject]);\", \"m = substr.global ? substr.exec(str) : null;\", \"}\", \"for (var i = subs.length - 1; i >= 0; i--) {\", \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\", \"}\", \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\", \"if (i !== -1) {\", \"var inject = newSubstr(str.substr(i, substr.length), i, str);\", \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\", \"}\", \"}\", \"return str;\", \"};\", \"})();\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\", \"String.prototype.endsWith = function(search, this_len) {\", \"if (this_len === undefined || this_len > this.length) {\", \"this_len = this.length;\", \"}\", \"return this.substring(this_len - search.length, this_len) === search;\", \"};\", \"}\", //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\", \"String.prototype.includes = function(search, start) {\", \"'use strict';\", \"if (typeof start !== 'number') {\", \"start = 0;\", \"}\", \" \", \"if (start + search.length > this.length) {\", \"return false;\", \"} else {\", \"return this.indexOf(search, start) !== -1;\", \"}\", \"};\", \"}\", // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\", \"String.prototype.startsWith = function(search, pos) {\", \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\", \"};\", \"}\", \"\");\n};\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Boolean constructor.\n\n wrapper = function (value) {\n value = Boolean(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new Boolean().\n this.data = value;\n return this;\n } else {\n // Called as Boolean().\n return value;\n }\n };\n\n this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Number constructor.\n\n wrapper = function (value) {\n value = Number(value);\n\n if (thisInterpreter.calledWithNew()) {\n // Called as new Number().\n this.data = value;\n return this;\n } else {\n // Called as Number().\n return value;\n }\n };\n\n this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n } // Instance methods on Number.\n\n\n wrapper = function (fractionDigits) {\n try {\n return Number(this).toExponential(fractionDigits);\n } catch (e) {\n // Throws if fractionDigits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toExponential\", wrapper);\n\n wrapper = function (digits) {\n try {\n return Number(this).toFixed(digits);\n } catch (e) {\n // Throws if digits isn't within 0-20.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toFixed\", wrapper);\n\n wrapper = function (precision) {\n try {\n return Number(this).toPrecision(precision);\n } catch (e) {\n // Throws if precision isn't within range (depends on implementation).\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toPrecision\", wrapper);\n\n wrapper = function (radix) {\n try {\n return Number(this).toString(radix);\n } catch (e) {\n // Throws if radix isn't within 2-36.\n thisInterpreter.throwException(thisInterpreter.ERROR, e.message);\n }\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toString\", wrapper);\n\n wrapper = function (locales, options) {\n locales = locales ? thisInterpreter.pseudoToNative(locales) : undefined;\n options = options ? thisInterpreter.pseudoToNative(options) : undefined;\n return Number(this).toLocaleString(locales, options);\n };\n\n this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper; // Date constructor.\n\n wrapper = function (value, var_args) {\n if (!thisInterpreter.calledWithNew()) {\n // Called as Date().\n // Calling Date() as a function returns a string, no arguments are heeded.\n return Date();\n } // Called as new Date().\n\n\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE); // Static methods on Date.\n\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.DATE, \"parse\", this.createNativeFunction(Date.parse, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR); // Instance methods on Date.\n\n var functions = [\"getDate\", \"getDay\", \"getFullYear\", \"getHours\", \"getMilliseconds\", \"getMinutes\", \"getMonth\", \"getSeconds\", \"getTime\", \"getTimezoneOffset\", \"getUTCDate\", \"getUTCDay\", \"getUTCFullYear\", \"getUTCHours\", \"getUTCMilliseconds\", \"getUTCMinutes\", \"getUTCMonth\", \"getUTCSeconds\", \"getYear\", \"setDate\", \"setFullYear\", \"setHours\", \"setMilliseconds\", \"setMinutes\", \"setMonth\", \"setSeconds\", \"setTime\", \"setUTCDate\", \"setUTCFullYear\", \"setUTCHours\", \"setUTCMilliseconds\", \"setUTCMinutes\", \"setUTCMonth\", \"setUTCSeconds\", \"setYear\", \"toDateString\", \"toISOString\", \"toJSON\", \"toGMTString\", \"toLocaleDateString\", \"toLocaleString\", \"toLocaleTimeString\", \"toTimeString\", \"toUTCString\"];\n\n for (var i = 0; i < functions.length; i++) {\n wrapper = function (nativeFunc) {\n return function (var_args) {\n var args = [];\n\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n\n return this.data[nativeFunc].apply(this.data, args);\n };\n }(functions[i]);\n\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper; // RegExp constructor.\n\n wrapper = function (pattern, flags) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new RegExp().\n var rgx = this;\n } else {\n // Called as RegExp().\n var rgx = thisInterpreter.createObjectProto(thisInterpreter.REGEXP_PROTO);\n }\n\n pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"global\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"ignoreCase\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"multiline\", undefined, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.REGEXP.properties[\"prototype\"], \"source\", \"(?:)\", Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString(); // Get lastIndex from wrapped regex, since this is settable.\n\n this.data.lastIndex = Number(thisInterpreter.getProperty(this, \"lastIndex\"));\n var match = this.data.exec(str);\n thisInterpreter.setProperty(this, \"lastIndex\", this.data.lastIndex);\n\n if (match) {\n var result = thisInterpreter.createObjectProto(thisInterpreter.ARRAY_PROTO);\n\n for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n } // match has additional properties.\n\n\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n\n return null;\n };\n\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this; // Error constructor.\n\n this.ERROR = this.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new Error().\n var newError = this;\n } else {\n // Called as Error().\n var newError = thisInterpreter.createObject(thisInterpreter.ERROR);\n }\n\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n return newError;\n }, true);\n this.setProperty(scope, \"Error\", this.ERROR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"message\", \"\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(this.ERROR.properties[\"prototype\"], \"name\", \"Error\", Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n var createErrorSubclass = function (name) {\n var constructor = thisInterpreter.createNativeFunction(function (opt_message) {\n if (thisInterpreter.calledWithNew()) {\n // Called as new XyzError().\n var newError = this;\n } else {\n // Called as XyzError().\n var newError = thisInterpreter.createObject(constructor);\n }\n\n if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(constructor.properties[\"prototype\"], \"name\", name, Interpreter.NONENUMERABLE_DESCRIPTOR);\n thisInterpreter.setProperty(scope, name, constructor);\n return constructor;\n };\n\n this.EVAL_ERROR = createErrorSubclass(\"EvalError\");\n this.RANGE_ERROR = createErrorSubclass(\"RangeError\");\n this.REFERENCE_ERROR = createErrorSubclass(\"ReferenceError\");\n this.SYNTAX_ERROR = createErrorSubclass(\"SyntaxError\");\n this.TYPE_ERROR = createErrorSubclass(\"TypeError\");\n this.URI_ERROR = createErrorSubclass(\"URIError\");\n};\n/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initMath = function (scope) {\n var thisInterpreter = this;\n var myMath = this.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"Math\", myMath);\n var mathConsts = [\"E\", \"LN2\", \"LN10\", \"LOG2E\", \"LOG10E\", \"PI\", \"SQRT1_2\", \"SQRT2\"];\n\n for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n var numFunctions = [\"abs\", \"acos\", \"asin\", \"atan\", \"atan2\", \"ceil\", \"cos\", \"exp\", \"floor\", \"log\", \"max\", \"min\", \"pow\", \"random\", \"round\", \"sin\", \"sqrt\", \"tan\"];\n\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(myMath, numFunctions[i], this.createNativeFunction(Math[numFunctions[i]], false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n};\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\n */\n\n\nInterpreter.prototype.initJSON = function (scope) {\n var thisInterpreter = this;\n var myJSON = thisInterpreter.createObjectProto(this.OBJECT_PROTO);\n this.setProperty(scope, \"JSON\", myJSON);\n\n var wrapper = function (text) {\n try {\n var nativeObj = JSON.parse(text.toString());\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, e.message);\n }\n\n return thisInterpreter.nativeToPseudo(nativeObj);\n };\n\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n\n return str;\n };\n\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\n/**\n * Is an object of a certain class?\n * @param {Interpreter.Value} child Object to check.\n * @param {Interpreter.Object} constructor Constructor of object.\n * @return {boolean} True if object is the class or inherits from it.\n * False otherwise.\n */\n\n\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n\n var proto = constructor.properties[\"prototype\"];\n\n if (child === proto) {\n return true;\n } // The first step up the prototype chain is harder since the child might be\n // a primitive value. Subsequent steps can just follow the .proto property.\n\n\n child = this.getPrototype(child);\n\n while (child) {\n if (child === proto) {\n return true;\n }\n\n child = child.proto;\n }\n\n return false;\n};\n/**\n * Is a value a legal integer for an array length?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\n\n\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0; // Array length must be between 0 and 2^32-1 (inclusive).\n\n return n === Number(x) ? n : NaN;\n};\n/**\n * Is a value a legal integer for an array index?\n * @param {Interpreter.Value} x Value to check.\n * @return {number} Zero, or a positive integer if the value can be\n * converted to such. NaN otherwise.\n */\n\n\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0; // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\n\n\nInterpreter.Value;\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\n */\n\nInterpreter.Object = function (proto) {\n this.getter = Object.create(null);\n this.setter = Object.create(null);\n this.properties = Object.create(null);\n this.proto = proto;\n};\n/** @type {Interpreter.Object} */\n\n\nInterpreter.Object.prototype.proto = null;\n/** @type {boolean} */\n\nInterpreter.Object.prototype.isObject = true;\n/** @type {string} */\n\nInterpreter.Object.prototype.class = \"Object\";\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\n\nInterpreter.Object.prototype.data = null;\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\n\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n\n try {\n var strs = [];\n\n for (var i = 0; i < this.properties.length; i++) {\n var value = this.properties[i];\n strs[i] = value && value.isObject && cycles.indexOf(value) !== -1 ? \"...\" : value;\n }\n } finally {\n cycles.pop();\n }\n\n return strs.join(\",\");\n }\n\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n\n var name, message; // Bug: Does not support getters and setters for name or message.\n\n var obj = this;\n\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while (obj = obj.proto);\n\n var obj = this;\n\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while (obj = obj.proto);\n\n cycles.push(this);\n\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n\n return message ? name + \": \" + message : String(name);\n } // RegExp, Date, and boxed primitives.\n\n\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\n */\n\n\nInterpreter.Object.prototype.valueOf = function () {\n if (this.data === undefined || this.data === null || this.data instanceof RegExp) {\n return this; // An Object.\n }\n\n if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n\n return this.data; // Boxed primitive.\n};\n/**\n * Create a new data object based on a constructor's prototype.\n * @param {Interpreter.Object} constructor Parent constructor function,\n * or null if scope object.\n * @return {!Interpreter.Object} New data object.\n */\n\n\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\n/**\n * Create a new data object based on a prototype.\n * @param {Interpreter.Object} proto Prototype object.\n * @return {!Interpreter.Object} New data object.\n */\n\n\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n\n var obj = new Interpreter.Object(proto); // Functions have prototype objects.\n\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n } // Arrays have length.\n\n\n if (this.isa(obj, this.ARRAY)) {\n this.setProperty(obj, \"length\", 0, {\n configurable: false,\n enumerable: false,\n writable: true\n });\n obj.class = \"Array\";\n }\n\n if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n\n return obj;\n};\n/**\n * Initialize a pseudo regular expression object based on a native regular\n * expression object.\n * @param {!Interpreter.Object} pseudoRegexp The existing object to set.\n * @param {!RegExp} nativeRegexp The native regular expression.\n */\n\n\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp; // lastIndex is settable, all others are read-only attributes\n\n this.setProperty(pseudoRegexp, \"lastIndex\", nativeRegexp.lastIndex, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"source\", nativeRegexp.source, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"global\", nativeRegexp.global, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"ignoreCase\", nativeRegexp.ignoreCase, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n this.setProperty(pseudoRegexp, \"multiline\", nativeRegexp.multiline, Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Create a new function.\n * @param {!Object} node AST node defining the function.\n * @param {!Object} scope Parent scope.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createFunction = function (node, scope) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.parentScope = scope;\n func.node = node;\n this.setProperty(func, \"length\", func.node[\"params\"].length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n/**\n * Create a new native function.\n * @param {!Function} nativeFunc JavaScript function.\n * @param {boolean=} opt_constructor If true, the function's\n * prototype will have its constructor property set to the function.\n * If false, the function cannot be called as a constructor (e.g. escape).\n * Defaults to undefined.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createNativeFunction = function (nativeFunc, opt_constructor) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.nativeFunc = nativeFunc;\n nativeFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", nativeFunc.length, Interpreter.READONLY_DESCRIPTOR);\n\n if (opt_constructor) {\n this.setProperty(func.properties[\"prototype\"], \"constructor\", func, Interpreter.NONENUMERABLE_DESCRIPTOR);\n } else if (opt_constructor === false) {\n func.illegalConstructor = true;\n this.setProperty(func, \"prototype\", undefined);\n }\n\n return func;\n};\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\n */\n\n\nInterpreter.prototype.createAsyncFunction = function (asyncFunc) {\n var func = this.createObjectProto(this.FUNCTION_PROTO);\n func.asyncFunc = asyncFunc;\n asyncFunc.id = this.functionCounter_++;\n this.setProperty(func, \"length\", asyncFunc.length, Interpreter.READONLY_DESCRIPTOR);\n return func;\n};\n/**\n * Converts from a native JS object or value to a JS interpreter object.\n * Can handle JSON-style values, does NOT handle cycles.\n * @param {*} nativeObj The native JS object to be converted.\n * @return {Interpreter.Value} The equivalent JS interpreter object.\n */\n\n\nInterpreter.prototype.nativeToPseudo = function (nativeObj) {\n if (typeof nativeObj !== \"object\" && typeof nativeObj !== \"function\" || nativeObj === null) {\n return nativeObj;\n }\n\n if (nativeObj instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, nativeObj);\n return pseudoRegexp;\n }\n\n if (nativeObj instanceof Date) {\n var pseudoDate = this.createObjectProto(this.DATE_PROTO);\n pseudoDate.data = nativeObj;\n return pseudoDate;\n }\n\n if (nativeObj instanceof Function) {\n var interpreter = this;\n\n var wrapper = function () {\n return interpreter.nativeToPseudo(nativeObj.apply(interpreter, Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n })));\n };\n\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\n\n for (var i = 0; i < nativeObj.length; i++) {\n if (i in nativeObj) {\n this.setProperty(pseudoObj, i, this.nativeToPseudo(nativeObj[i]));\n }\n }\n } else {\n // Object.\n pseudoObj = this.createObjectProto(this.OBJECT_PROTO);\n\n for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n\n return pseudoObj;\n};\n/**\n * Converts from a JS interpreter object to native JS object.\n * Can handle JSON-style values, plus cycles.\n * @param {Interpreter.Value} pseudoObj The JS interpreter object to be\n * converted.\n * @param {Object=} opt_cycles Cycle detection (used in recursive calls).\n * @return {*} The equivalent native JS object or value.\n */\n\n\nInterpreter.prototype.pseudoToNative = function (pseudoObj, opt_cycles) {\n if (typeof pseudoObj !== \"object\" && typeof pseudoObj !== \"function\" || pseudoObj === null) {\n return pseudoObj;\n }\n\n if (this.isa(pseudoObj, this.REGEXP)) {\n // Regular expression.\n return pseudoObj.data;\n }\n\n if (this.isa(pseudoObj, this.DATE)) {\n // Date.\n return pseudoObj.data;\n }\n\n var cycles = opt_cycles || {\n pseudo: [],\n native: []\n };\n var i = cycles.pseudo.indexOf(pseudoObj);\n\n if (i !== -1) {\n return cycles.native[i];\n }\n\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\n\n for (var i = 0; i < length; i++) {\n if (this.hasProperty(pseudoObj, i)) {\n nativeObj[i] = this.pseudoToNative(this.getProperty(pseudoObj, i), cycles);\n }\n }\n } else {\n // Object.\n nativeObj = {};\n cycles.native.push(nativeObj);\n var val;\n\n for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\n/**\n * Converts from a native JS array to a JS interpreter array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Array} nativeArray The JS array to be converted.\n * @return {!Interpreter.Object} The equivalent JS interpreter array.\n */\n\n\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n\n return pseudoArray;\n};\n/**\n * Converts from a JS interpreter array to native JS array.\n * Does handle non-numeric properties (like str.match's index prop).\n * Does NOT recurse into the array's contents.\n * @param {!Interpreter.Object} pseudoArray The JS interpreter array,\n * or JS interpreter object pretending to be an array.\n * @return {!Array} The equivalent native JS array.\n */\n\n\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n } // pseudoArray might be an object pretending to be an array. In this case\n // it's possible that length is non-existent, invalid, or smaller than the\n // largest defined numeric property. Set length explicitly here.\n\n\n nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\n/**\n * Look up the prototype for this value.\n * @param {Interpreter.Value} value Data object.\n * @return {Interpreter.Object} Prototype object, null if none.\n */\n\n\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n\n if (value) {\n return value.proto;\n }\n\n return null;\n};\n/**\n * Fetch a property value from a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line numbers\n * @return {Interpreter.Value} Property value (may be undefined).\n */\n\n\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n\n if (obj === undefined || obj === null) {\n let lineNum;\n\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\n }\n\n if (name === \"length\") {\n // Special cases for magic length property.\n if (this.isa(obj, this.STRING)) {\n return String(obj).length;\n }\n } else if (name.charCodeAt(0) < 0x40) {\n // Might have numbers in there?\n // Special cases for string array indexing\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\n\n if (getter) {\n // Flag this function as being a getter and thus needing immediate\n // execution (rather than being the value of the property).\n getter.isGetter = true;\n return getter;\n }\n\n return obj.properties[name];\n }\n } while (obj = this.getPrototype(obj));\n\n return undefined;\n};\n/**\n * Does the named property exist on a data object.\n * @param {Interpreter.Value} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @return {boolean} True if property exists.\n */\n\n\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n\n name = String(name);\n\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while (obj = this.getPrototype(obj));\n\n return false;\n};\n/**\n * Set a property value on a data object.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {Interpreter.Value} value New property value.\n * Use Interpreter.VALUE_IN_DESCRIPTOR if value is handled by\n * descriptor instead.\n * @param {Object=} opt_descriptor Optional descriptor object.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n\n if (opt_descriptor && (\"get\" in opt_descriptor || \"set\" in opt_descriptor) && (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)) {\n this.throwException(this.TYPE_ERROR, \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\");\n }\n\n var strict = !this.stateStack || this.getScope().strict;\n\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n\n return;\n }\n\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n\n if (name === \"length\" || !isNaN(n) && n < String(obj).length) {\n // Can't set length or letters on String objects.\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\");\n }\n\n return;\n }\n }\n\n if (obj.class === \"Array\") {\n // Arrays have a magic length variable that is bound to the elements.\n var length = obj.properties.length;\n var i;\n\n if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n\n value = opt_descriptor.value;\n }\n\n value = Interpreter.legalArrayLength(value);\n\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\n\n if (!isNaN(i) && value <= i) {\n delete obj.properties[i];\n }\n }\n }\n } else if (!isNaN(i = Interpreter.legalArrayIndex(name))) {\n // Increase length if this index is larger.\n obj.properties.length = Math.max(length, i + 1);\n }\n }\n\n if (obj.preventExtensions && !(name in obj.properties)) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't add property '\" + name + \"', object is not extensible\");\n }\n\n return;\n }\n\n if (opt_descriptor) {\n // Define the property.\n if (\"get\" in opt_descriptor) {\n if (opt_descriptor.get) {\n obj.getter[name] = opt_descriptor.get;\n } else {\n delete obj.getter[name];\n }\n }\n\n if (\"set\" in opt_descriptor) {\n if (opt_descriptor.set) {\n obj.setter[name] = opt_descriptor.set;\n } else {\n delete obj.setter[name];\n }\n }\n\n var descriptor = {};\n\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\n }\n\n if (\"writable\" in opt_descriptor) {\n descriptor.writable = opt_descriptor.writable;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n\n if (\"value\" in opt_descriptor) {\n descriptor.value = opt_descriptor.value;\n delete obj.getter[name];\n delete obj.setter[name];\n } else if (value !== Interpreter.VALUE_IN_DESCRIPTOR) {\n descriptor.value = value;\n delete obj.getter[name];\n delete obj.setter[name];\n }\n\n try {\n Object.defineProperty(obj.properties, name, descriptor);\n } catch (e) {\n this.throwException(this.TYPE_ERROR, \"Cannot redefine property: \" + name);\n }\n } else {\n // Set the property.\n if (value === Interpreter.VALUE_IN_DESCRIPTOR) {\n throw ReferenceError(\"Value not specified.\");\n } // Determine the parent (possibly self) where the property is defined.\n\n\n var defObj = obj;\n\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\");\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\");\n }\n }\n }\n }\n};\n/**\n * Convenience method for adding a native function as a non-enumerable property\n * onto an object's prototype.\n * @param {!Interpreter.Object} obj Data object.\n * @param {Interpreter.Value} name Name of property.\n * @param {!Function} wrapper Function object.\n */\n\n\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(obj.properties[\"prototype\"], name, this.createNativeFunction(wrapper, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n};\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\n\n\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n\n return scope;\n};\n/**\n * Create a new scope dictionary.\n * @param {!Object} node AST node defining the scope container\n * (e.g. a function).\n * @param {Interpreter.Object} parentScope Scope to link to.\n * @return {!Interpreter.Object} New scope.\n */\n\n\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n\n this.populateScope_(node, scope); // Determine if this scope starts with 'use strict'.\n\n scope.strict = false;\n\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n\n if (firstNode && firstNode.expression && firstNode.expression[\"type\"] === \"Literal\" && firstNode.expression.value === \"use strict\") {\n scope.strict = true;\n }\n }\n\n return scope;\n};\n/**\n * Create a new special scope dictionary. Similar to createScope(), but\n * doesn't assume that the scope is for a function body.\n * This is used for 'catch' clauses and 'with' statements.\n * @param {!Interpreter.Object} parentScope Scope to link to.\n * @param {Interpreter.Object=} opt_scope Optional object to transform into\n * scope.\n * @return {!Interpreter.Object} New scope.\n */\n\n\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\n/**\n * Retrieves a value from the scope chain.\n * @param {string} name Name of variable.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\n\n\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n\n scope = scope.parentScope;\n } // The root scope is also an object which has inherited properties and\n // could also have getters.\n\n\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n } // Typeof operator is unique: it can safely look at non-defined variables.\n\n\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\n/**\n * Sets a value to the current scope.\n * @param {string} name Name of variable.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n\n scope = scope.parentScope;\n } // The root scope is also an object which has readonly properties and\n // could also have setters.\n\n\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\n/**\n * Create a new scope for the given node.\n * @param {!Object} node AST node (program or function).\n * @param {!Interpreter.Object} scope Scope dictionary to populate.\n * @private\n */\n\n\nInterpreter.prototype.populateScope_ = function (node, scope) {\n if (node[\"type\"] === \"VariableDeclaration\") {\n for (var i = 0; i < node[\"declarations\"].length; i++) {\n this.setProperty(scope, node[\"declarations\"][i][\"id\"][\"name\"], undefined, Interpreter.VARIABLE_DESCRIPTOR);\n }\n } else if (node[\"type\"] === \"FunctionDeclaration\") {\n this.setProperty(scope, node[\"id\"][\"name\"], this.createFunction(node, scope), Interpreter.VARIABLE_DESCRIPTOR);\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"FunctionExpression\") {\n return; // Do not recurse into function.\n } else if (node[\"type\"] === \"ExpressionStatement\") {\n return; // Expressions can't contain variable/function declarations.\n }\n\n var nodeClass = node[\"constructor\"];\n\n for (var name in node) {\n var prop = node[name];\n\n if (prop && typeof prop === \"object\") {\n if (Array.isArray(prop)) {\n for (var i = 0; i < prop.length; i++) {\n if (prop[i] && prop[i].constructor === nodeClass) {\n this.populateScope_(prop[i], scope);\n }\n }\n } else {\n if (prop.constructor === nodeClass) {\n this.populateScope_(prop, scope);\n }\n }\n }\n }\n};\n/**\n * Remove start and end values from AST, or set start and end values to a\n * constant value. Used to remove highlighting from polyfills and to set\n * highlighting in an eval to cover the entire eval expression.\n * @param {!Object} node AST node.\n * @param {number=} start Starting character of all nodes, or undefined.\n * @param {number=} end Ending character of all nodes, or undefined.\n * @private\n */\n\n\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\n }\n }\n};\n/**\n * Is the current state directly being called with as a construction with 'new'.\n * @return {boolean} True if 'new foo()', false if 'foo()'.\n */\n\n\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\n/**\n * Gets a value from the scope chain or from an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Acorn AST Node} node Node that triggered this function. Used by Bitburner for getting error line number\n * @return {Interpreter.Value} Any value.\n * May be flagged as being a getter and thus needing immediate execution\n * (rather than being the value of the property).\n */\n\n\nInterpreter.prototype.getValue = function (ref, node) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.getValueFromScope(ref[1], node);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.getProperty(ref[0], ref[1], node);\n }\n};\n/**\n * Sets a value to the scope chain or to an object property.\n * @param {!Array} ref Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value.\n * @return {!Interpreter.Object|undefined} Returns a setter function if one\n * needs to be called, otherwise undefined.\n */\n\n\nInterpreter.prototype.setValue = function (ref, value) {\n if (ref[0] === Interpreter.SCOPE_REFERENCE) {\n // A null/varname variable lookup.\n return this.setValueToScope(ref[1], value);\n } else {\n // An obj/prop components tuple (foo.bar).\n return this.setProperty(ref[0], ref[1], value);\n }\n};\n/**\n * Completion Value Types.\n * @enum {number}\n */\n\n\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4\n};\n/**\n * Throw an exception in the interpreter that can be handled by an\n * interpreter try/catch statement. If unhandled, a real exception will\n * be thrown. Can be called with either an error class and a message, or\n * with an actual object to be thrown.\n * @param {!Interpreter.Object} errorClass Type of error (if message is\n * provided) or the value to throw (if no message).\n * @param {string=} opt_message Message being thrown.\n */\n\nInterpreter.prototype.throwException = function (errorClass, opt_message, lineNumber) {\n if (opt_message === undefined) {\n var error = errorClass; // This is a value to throw, not an error class.\n } else {\n var error = this.createObject(errorClass);\n this.setProperty(error, \"message\", opt_message, Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n\n var lineNumErrorMsg;\n\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg); // Abort anything related to the current step.\n\n throw Interpreter.STEP_ERROR;\n};\n/**\n * Unwind the stack to the innermost relevant enclosing TryStatement,\n * For/ForIn/WhileStatement or Call/NewExpression. If this results in\n * the stack being completely unwound the thread will be terminated\n * and the appropriate error being thrown.\n * @param {Interpreter.Completion} type Completion type.\n * @param {Interpreter.Value=} value Value computed, returned or thrown.\n * @param {string=} label Target label for break or return.\n */\n\n\nInterpreter.prototype.unwind = function (type, value, label, lineNumberMsg = \"\") {\n if (type === Interpreter.Completion.NORMAL) {\n throw TypeError(\"Should not unwind for NORMAL completions\");\n }\n\n for (var stack = this.stateStack; stack.length > 0; stack.pop()) {\n var state = stack[stack.length - 1];\n\n switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = {\n type: type,\n value: value,\n label: label\n };\n return;\n\n case \"CallExpression\":\n case \"NewExpression\":\n if (type === Interpreter.Completion.RETURN) {\n state.value = value;\n return;\n } else if (type !== Interpreter.Completion.THROW) {\n throw Error(\"Unsynatctic break/continue not rejected by Acorn\");\n }\n\n }\n\n if (type === Interpreter.Completion.BREAK) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop || state.isSwitch) {\n stack.pop();\n return;\n }\n } else if (type === Interpreter.Completion.CONTINUE) {\n if (label ? state.labels && state.labels.indexOf(label) !== -1 : state.isLoop) {\n return;\n }\n }\n } // Unhandled completion. Throw a real error.\n\n\n var realError;\n\n if (this.isa(value, this.ERROR)) {\n var errorTable = {\n EvalError: EvalError,\n RangeError: RangeError,\n ReferenceError: ReferenceError,\n SyntaxError: SyntaxError,\n TypeError: TypeError,\n URIError: URIError\n };\n var name = this.getProperty(value, \"name\").toString();\n var message = this.getProperty(value, \"message\").valueOf();\n var type = errorTable[name] || Error;\n realError = type(message + lineNumberMsg);\n } else {\n realError = String(value) + lineNumberMsg;\n }\n\n throw realError;\n};\n/**\n * Create a call to a getter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @private\n */\n\n\nInterpreter.prototype.createGetter_ = function (func, left) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is explicitly provided (o).\n var funcThis = Array.isArray(left) ? left[0] : left;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [];\n return state;\n};\n/**\n * Create a call to a setter function.\n * @param {!Interpreter.Object} func Function to execute.\n * @param {!Interpreter.Object|!Array} left\n * Name of variable or object/propname tuple.\n * @param {Interpreter.Value} value Value to set.\n * @private\n */\n\n\nInterpreter.prototype.createSetter_ = function (func, left, value) {\n // Normally 'this' will be specified as the object component (o.x).\n // Sometimes 'this' is implicitly the global object (x).\n var funcThis = Array.isArray(left) ? left[0] : this.global;\n var node = new this.nodeConstructor();\n node[\"type\"] = \"CallExpression\";\n var state = new Interpreter.State(node, this.stateStack[this.stateStack.length - 1].scope);\n state.doneCallee_ = true;\n state.funcThis_ = funcThis;\n state.func_ = func;\n state.doneArgs_ = true;\n state.arguments_ = [value];\n return state;\n};\n/**\n * Class for a state.\n * @param {!Object} node AST node for the state.\n * @param {!Interpreter.Object} scope Scope object for the state.\n * @constructor\n */\n\n\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n}; ///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\n\n if (!state.array_) {\n state.array_ = this.createObjectProto(this.ARRAY_PROTO);\n state.array_.properties.length = elements.length;\n } else {\n this.setProperty(state.array_, n, state.value);\n n++;\n }\n\n while (n < elements.length) {\n // Skip missing elements - they're not defined, not undefined.\n if (elements[n]) {\n state.n_ = n;\n return new Interpreter.State(elements[n], state.scope);\n }\n\n n++;\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.array_;\n};\n\nInterpreter.prototype[\"stepAssignmentExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"left\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\n\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = leftValue;\n return this.createGetter_(func, state.leftReference_);\n }\n }\n\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n\n var value = state.leftValue_;\n var rightValue = state.value;\n\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n\n case \"+=\":\n value += rightValue;\n break;\n\n case \"-=\":\n value -= rightValue;\n break;\n\n case \"*=\":\n value *= rightValue;\n break;\n\n case \"/=\":\n value /= rightValue;\n break;\n\n case \"%=\":\n value %= rightValue;\n break;\n\n case \"<<=\":\n value <<= rightValue;\n break;\n\n case \">>=\":\n value >>= rightValue;\n break;\n\n case \">>>=\":\n value >>>= rightValue;\n break;\n\n case \"&=\":\n value &= rightValue;\n break;\n\n case \"^=\":\n value ^= rightValue;\n break;\n\n case \"|=\":\n value |= rightValue;\n break;\n\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n\n var setter = this.setValue(state.leftReference_, value);\n\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n } // Return if no setter function.\n\n\n stack.pop();\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBinaryExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n\n if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n\n case \"!=\":\n value = leftValue != rightValue;\n break;\n\n case \"===\":\n value = leftValue === rightValue;\n break;\n\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n\n case \">\":\n value = leftValue > rightValue;\n break;\n\n case \">=\":\n value = leftValue >= rightValue;\n break;\n\n case \"<\":\n value = leftValue < rightValue;\n break;\n\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n\n case \"+\":\n value = leftValue + rightValue;\n break;\n\n case \"-\":\n value = leftValue - rightValue;\n break;\n\n case \"*\":\n value = leftValue * rightValue;\n break;\n\n case \"/\":\n value = leftValue / rightValue;\n break;\n\n case \"%\":\n value = leftValue % rightValue;\n break;\n\n case \"&\":\n value = leftValue & rightValue;\n break;\n\n case \"|\":\n value = leftValue | rightValue;\n break;\n\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n\n case \"<<\":\n value = leftValue << rightValue;\n break;\n\n case \">>\":\n value = leftValue >> rightValue;\n break;\n\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\n\n case \"in\":\n if (!rightValue || !rightValue.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"'in' expects an object, not '\" + rightValue + \"'\", lineNum);\n }\n\n value = this.hasProperty(rightValue, leftValue);\n break;\n\n case \"instanceof\":\n if (!this.isa(rightValue, this.FUNCTION)) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, \"Right-hand side of instanceof is not an object\", lineNum);\n }\n\n value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepBlockStatement\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n};\n\nInterpreter.prototype[\"stepBreakStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.BREAK, undefined, label);\n};\n\nInterpreter.prototype[\"stepCallExpression\"] = function (stack, state, node) {\n if (!state.doneCallee_) {\n state.doneCallee_ = 1; // Components needed to determine value of 'this'.\n\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\n\n if (func[0] === Interpreter.SCOPE_REFERENCE) {\n // (Globally or locally) named function. Is it named 'eval'?\n state.directEval_ = func[1] === \"eval\";\n } else {\n // Method function, 'this' is object (ignored if invoked as 'new').\n state.funcThis_ = func[0];\n }\n\n func = state.func_;\n\n if (func && typeof func === \"object\" && func.isGetter) {\n // Clear the getter flag and call the getter function.\n func.isGetter = false;\n state.doneCallee_ = 1;\n return this.createGetter_(func, state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n\n state.arguments_ = [];\n state.n_ = 0;\n }\n\n var func = state.func_;\n\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n } // Determine value of 'this' in function.\n\n\n if (node[\"type\"] === \"NewExpression\") {\n if (func.illegalConstructor) {\n // Illegal: new escape();\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a constructor\", lineNum);\n } // Constructor, 'this' is new object.\n\n\n var proto = func.properties[\"prototype\"];\n\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\n }\n\n state.funcThis_ = this.createObjectProto(proto);\n state.isConstructor = true;\n } else if (state.funcThis_ === undefined) {\n // Global function, 'this' is global object (or 'undefined' if strict).\n state.funcThis_ = state.scope.strict ? undefined : this.global;\n }\n\n state.doneArgs_ = true;\n }\n\n if (!state.doneExec_) {\n state.doneExec_ = true;\n\n if (!func || !func.isObject) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func + \" is not a function\", lineNum);\n }\n\n var funcNode = func.node;\n\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope); // Add all arguments.\n\n for (var i = 0; i < funcNode[\"params\"].length; i++) {\n var paramName = funcNode[\"params\"][i][\"name\"];\n var paramValue = state.arguments_.length > i ? state.arguments_[i] : undefined;\n this.setProperty(scope, paramName, paramValue);\n } // Build arguments variable.\n\n\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n\n this.setProperty(scope, \"arguments\", argsList); // Add the function's name (var x = function foo(){};)\n\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n\n if (name) {\n this.setProperty(scope, name, func);\n }\n\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\n\n if (typeof code !== \"string\") {\n // JS does not parse String objects:\n // eval(new String('1 + 1')) -> '1 + 1'\n state.value = code;\n } else {\n try {\n var ast = acorn__WEBPACK_IMPORTED_MODULE_0__[/* parse */ \"b\"](code.toString(), Interpreter.PARSE_OPTIONS);\n } catch (e) {\n // Acorn threw a SyntaxError. Rethrow as a trappable error.\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"Invalid code: \" + e.message, lineNum);\n }\n\n var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]); // Create new scope and update it with definitions in eval().\n\n var scope = state.directEval_ ? state.scope : this.global;\n\n if (scope.strict) {\n // Strict mode get its own scope in eval.\n scope = this.createScope(ast, scope);\n } else {\n // Non-strict mode pollutes the current scope.\n this.populateScope_(ast, scope);\n }\n\n this.value = undefined; // Default value if no code.\n\n return new Interpreter.State(evalNode, scope);\n }\n } else if (func.nativeFunc) {\n state.value = func.nativeFunc.apply(state.funcThis_, state.arguments_);\n } else if (func.asyncFunc) {\n var thisInterpreter = this;\n\n var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\n };\n\n var argsWithCallback = state.arguments_.concat(callback);\n this.paused_ = true;\n func.asyncFunc.apply(state.funcThis_, argsWithCallback);\n return;\n } else {\n /* A child of a function is a function but is not callable. For example:\n var F = function() {};\n F.prototype = escape;\n var f = new F();\n f();\n */\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.TYPE_ERROR, func.class + \" is not a function\", lineNum);\n }\n } else {\n // Execution complete. Put the return value on the stack.\n stack.pop();\n\n if (state.isConstructor && typeof state.value !== \"object\") {\n stack[stack.length - 1].value = state.funcThis_;\n } else {\n stack[stack.length - 1].value = state.value;\n }\n }\n};\n\nInterpreter.prototype[\"stepCatchClause\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true; // Create an empty scope.\n\n var scope = this.createSpecialScope(state.scope); // Add the argument.\n\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue); // Execute catch clause.\n\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepConditionalExpression\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n\n if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\n\n if (value && node[\"consequent\"]) {\n // Execute 'if' block.\n return new Interpreter.State(node[\"consequent\"], state.scope);\n } else if (!value && node[\"alternate\"]) {\n // Execute 'else' block.\n return new Interpreter.State(node[\"alternate\"], state.scope);\n } // eval('1;if(false){2}') -> undefined\n\n\n this.value = undefined;\n }\n\n stack.pop();\n\n if (node[\"type\"] === \"ConditionalExpression\") {\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepContinueStatement\"] = function (stack, state, node) {\n var label = node[\"label\"] && node[\"label\"][\"name\"];\n this.unwind(Interpreter.Completion.CONTINUE, undefined, label);\n};\n\nInterpreter.prototype[\"stepDebuggerStatement\"] = function (stack, state, node) {\n // Do nothing. May be overridden by developers.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepDoWhileStatement\"] = function (stack, state, node) {\n if (node[\"type\"] === \"DoWhileStatement\" && state.test_ === undefined) {\n // First iteration of do/while executes without checking test.\n state.value = true;\n state.test_ = true;\n }\n\n if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n\n if (!state.value) {\n // Done, exit loop.\n stack.pop();\n } else if (node[\"body\"]) {\n // Execute the body.\n state.test_ = false;\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepEmptyStatement\"] = function (stack, state, node) {\n stack.pop();\n};\n\nInterpreter.prototype[\"stepEvalProgram_\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"body\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n stack[stack.length - 1].value = this.value;\n};\n\nInterpreter.prototype[\"stepExpressionStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"expression\"], state.scope);\n }\n\n stack.pop(); // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\n\n this.value = state.value;\n};\n\nInterpreter.prototype[\"stepForInStatement\"] = function (stack, state, node) {\n // First, initialize a variable if exists. Only do so once, ever.\n if (!state.doneInit_) {\n state.doneInit_ = true;\n\n if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(this.SYNTAX_ERROR, \"for-in loop variable declaration may not have an initializer.\", lineNum);\n } // Variable initialization: for (var x = 4 in y)\n\n\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n } // Second, look up the object. Only do so once, ever.\n\n\n if (!state.doneObject_) {\n state.doneObject_ = true;\n\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n } // Third, find the property name for this iteration.\n\n\n if (state.name_ === undefined) {\n gotPropName: while (true) {\n if (state.object_ && state.object_.isObject) {\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_.properties);\n }\n\n while (true) {\n var prop = state.props_.shift();\n\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n\n state.visited_[prop] = true;\n\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\n }\n\n state.name_ = prop;\n break gotPropName;\n }\n } else if (state.object_ !== null && state.object_ !== undefined) {\n // Primitive value (other than null or undefined).\n if (!state.props_) {\n state.props_ = Object.getOwnPropertyNames(state.object_);\n }\n\n while (true) {\n var prop = state.props_.shift();\n\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n\n state.visited_[prop] = true;\n\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n\n state.name_ = prop;\n break gotPropName;\n }\n }\n\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n } // Fourth, find the variable\n\n\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\n\n if (left[\"type\"] === \"VariableDeclaration\") {\n // Inline variable declaration: for (var x in y)\n state.variable_ = [Interpreter.SCOPE_REFERENCE, left[\"declarations\"][0][\"id\"][\"name\"]];\n } else {\n // Arbitrary left side: for (foo().bar in y)\n state.variable_ = null;\n var nextState = new Interpreter.State(left, state.scope);\n nextState.components = true;\n return nextState;\n }\n }\n\n if (!state.variable_) {\n state.variable_ = state.value;\n } // Fifth, set the variable.\n\n\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n } // Next step will be step three.\n\n\n state.name_ = undefined; // Reevaluate the variable since it could be a setter on the global object.\n\n state.doneVariable_ = false;\n state.doneSetter_ = false; // Sixth and finally, execute the body if there was one. this.\n\n if (node[\"body\"]) {\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n};\n\nInterpreter.prototype[\"stepForStatement\"] = function (stack, state, node) {\n var mode = state.mode_ || 0;\n\n if (mode === 0) {\n state.mode_ = 1;\n\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\n\n if (node[\"test\"] && !state.value) {\n // Done, exit loop.\n stack.pop();\n } else {\n // Execute the body.\n state.isLoop = true;\n return new Interpreter.State(node[\"body\"], state.scope);\n }\n } else if (mode === 3) {\n state.mode_ = 1;\n\n if (node[\"update\"]) {\n return new Interpreter.State(node[\"update\"], state.scope);\n }\n }\n};\n\nInterpreter.prototype[\"stepFunctionDeclaration\"] = function (stack, state, node) {\n // This was found and handled when the scope was populated.\n stack.pop();\n};\n\nInterpreter.prototype[\"stepFunctionExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.createFunction(node, state.scope);\n};\n\nInterpreter.prototype[\"stepIdentifier\"] = function (stack, state, node) {\n stack.pop();\n\n if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n\n var value = this.getValueFromScope(node[\"name\"], node); // An identifier could be a getter if it's a property on the global object.\n\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var scope = state.scope;\n\n while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n\n var func = value;\n return this.createGetter_(func, this.global);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepIfStatement\"] = Interpreter.prototype[\"stepConditionalExpression\"];\n\nInterpreter.prototype[\"stepLabeledStatement\"] = function (stack, state, node) {\n // No need to hit this node again on the way back up the stack.\n stack.pop(); // Note that a statement might have multiple labels.\n\n var labels = state.labels || [];\n labels.push(node[\"label\"][\"name\"]);\n var nextState = new Interpreter.State(node[\"body\"], state.scope);\n nextState.labels = labels;\n return nextState;\n};\n\nInterpreter.prototype[\"stepLiteral\"] = function (stack, state, node) {\n stack.pop();\n var value = node[\"value\"];\n\n if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepLogicalExpression\"] = function (stack, state, node) {\n if (node[\"operator\"] !== \"&&\" && node[\"operator\"] !== \"||\") {\n throw SyntaxError(\"Unknown logical operator: \" + node[\"operator\"]);\n }\n\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n\n if (!state.doneRight_) {\n if (node[\"operator\"] === \"&&\" && !state.value || node[\"operator\"] === \"||\" && state.value) {\n // Shortcut evaluation.\n stack.pop();\n stack[stack.length - 1].value = state.value;\n } else {\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n } else {\n stack.pop();\n stack[stack.length - 1].value = state.value;\n }\n};\n\nInterpreter.prototype[\"stepMemberExpression\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n }\n\n var propName;\n\n if (!node[\"computed\"]) {\n state.object_ = state.value; // obj.foo -- Just access 'foo' directly.\n\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value; // obj[foo] -- Compute value of 'foo'.\n\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n\n stack.pop();\n\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\n\n if (value && typeof value === \"object\" && value.isGetter) {\n // Clear the getter flag and call the getter function.\n value.isGetter = false;\n var func = value;\n return this.createGetter_(func, state.object_);\n }\n\n stack[stack.length - 1].value = value;\n }\n};\n\nInterpreter.prototype[\"stepNewExpression\"] = Interpreter.prototype[\"stepCallExpression\"];\n\nInterpreter.prototype[\"stepObjectExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var property = node[\"properties\"][n];\n\n if (!state.object_) {\n // First execution.\n state.object_ = this.createObjectProto(this.OBJECT_PROTO);\n state.properties_ = Object.create(null);\n } else {\n // Determine property name.\n var key = property[\"key\"];\n\n if (key[\"type\"] === \"Identifier\") {\n var propName = key[\"name\"];\n } else if (key[\"type\"] === \"Literal\") {\n var propName = key[\"value\"];\n } else {\n throw SyntaxError(\"Unknown object structure: \" + key[\"type\"]);\n } // Set the property computed in the previous execution.\n\n\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\n\n if (\"get\" in kinds || \"set\" in kinds) {\n // Set a property with a getter or setter.\n var descriptor = {\n configurable: true,\n enumerable: true,\n get: kinds[\"get\"],\n set: kinds[\"set\"]\n };\n this.setProperty(state.object_, key, null, descriptor);\n } else {\n // Set a normal property with a value.\n this.setProperty(state.object_, key, kinds[\"init\"]);\n }\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.object_;\n};\n\nInterpreter.prototype[\"stepProgram\"] = function (stack, state, node) {\n var expression = node[\"body\"].shift();\n\n if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n\n state.done = true; // Don't pop the stateStack.\n // Leave the root scope on the tree in case the program is appended to.\n};\n\nInterpreter.prototype[\"stepReturnStatement\"] = function (stack, state, node) {\n if (node[\"argument\"] && !state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n }\n\n this.unwind(Interpreter.Completion.RETURN, state.value, undefined);\n};\n\nInterpreter.prototype[\"stepSequenceExpression\"] = function (stack, state, node) {\n var n = state.n_ || 0;\n var expression = node[\"expressions\"][n];\n\n if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\n }\n\n stack.pop();\n stack[stack.length - 1].value = state.value;\n};\n\nInterpreter.prototype[\"stepSwitchStatement\"] = function (stack, state, node) {\n if (!state.test_) {\n state.test_ = 1;\n return new Interpreter.State(node[\"discriminant\"], state.scope);\n }\n\n if (state.test_ === 1) {\n state.test_ = 2; // Preserve switch value between case tests.\n\n state.switchValue_ = state.value;\n state.defaultCase_ = -1;\n }\n\n while (true) {\n var index = state.index_ || 0;\n var switchCase = node[\"cases\"][index];\n\n if (!state.matched_ && switchCase && !switchCase[\"test\"]) {\n // Test on the default case is null.\n // Bypass (but store) the default case, and get back to it later.\n state.defaultCase_ = index;\n state.index_ = index + 1;\n continue;\n }\n\n if (!switchCase && !state.matched_ && state.defaultCase_ !== -1) {\n // Ran through all cases, no match. Jump to the default.\n state.matched_ = true;\n state.index_ = state.defaultCase_;\n continue;\n }\n\n if (switchCase) {\n if (!state.matched_ && !state.tested_ && switchCase[\"test\"]) {\n state.tested_ = true;\n return new Interpreter.State(switchCase[\"test\"], state.scope);\n }\n\n if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\n\n if (switchCase[\"consequent\"][n]) {\n state.isSwitch = true;\n state.n_ = n + 1;\n return new Interpreter.State(switchCase[\"consequent\"][n], state.scope);\n }\n } // Move on to next case.\n\n\n state.tested_ = false;\n state.n_ = 0;\n state.index_ = index + 1;\n } else {\n stack.pop();\n return;\n }\n }\n};\n\nInterpreter.prototype[\"stepThisExpression\"] = function (stack, state, node) {\n stack.pop();\n stack[stack.length - 1].value = this.getValueFromScope(\"this\", node);\n};\n\nInterpreter.prototype[\"stepThrowStatement\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n return new Interpreter.State(node[\"argument\"], state.scope);\n } else {\n this.throwException(state.value);\n }\n};\n\nInterpreter.prototype[\"stepTryStatement\"] = function (stack, state, node) {\n if (!state.doneBlock_) {\n state.doneBlock_ = true;\n return new Interpreter.State(node[\"block\"], state.scope);\n }\n\n if (state.cv && state.cv.type === Interpreter.Completion.THROW && !state.doneHandler_ && node[\"handler\"]) {\n state.doneHandler_ = true;\n var nextState = new Interpreter.State(node[\"handler\"], state.scope);\n nextState.throwValue = state.cv.value;\n state.cv = undefined; // This error has been handled, don't rethrow.\n\n return nextState;\n }\n\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n\n stack.pop();\n\n if (state.cv) {\n // There was no catch handler, or the catch/finally threw an error.\n // Throw the error up to a higher try.\n this.unwind(state.cv.type, state.cv.value, state.cv.label);\n }\n};\n\nInterpreter.prototype[\"stepUnaryExpression\"] = function (stack, state, node) {\n if (!state.done_) {\n state.done_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = node[\"operator\"] === \"delete\";\n return nextState;\n }\n\n stack.pop();\n var value = state.value;\n\n if (node[\"operator\"] === \"-\") {\n value = -value;\n } else if (node[\"operator\"] === \"+\") {\n value = +value;\n } else if (node[\"operator\"] === \"!\") {\n value = !value;\n } else if (node[\"operator\"] === \"~\") {\n value = ~value;\n } else if (node[\"operator\"] === \"delete\") {\n var result = true; // If value is not an array, then it is a primitive, or some other value.\n // If so, skip the delete and return true.\n\n if (Array.isArray(value)) {\n var obj = value[0];\n\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n\n var name = String(value[1]);\n\n try {\n delete obj.properties[name];\n } catch (e) {\n if (state.scope.strict) {\n this.throwException(this.TYPE_ERROR, \"Cannot delete property '\" + name + \"' of '\" + obj + \"'\");\n } else {\n result = false;\n }\n }\n }\n\n value = result;\n } else if (node[\"operator\"] === \"typeof\") {\n value = value && value.class === \"Function\" ? \"function\" : typeof value;\n } else if (node[\"operator\"] === \"void\") {\n value = undefined;\n } else {\n throw SyntaxError(\"Unknown unary operator: \" + node[\"operator\"]);\n }\n\n stack[stack.length - 1].value = value;\n};\n\nInterpreter.prototype[\"stepUpdateExpression\"] = function (stack, state, node) {\n if (!state.doneLeft_) {\n state.doneLeft_ = true;\n var nextState = new Interpreter.State(node[\"argument\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n\n if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\n\n if (leftValue && typeof leftValue === \"object\" && leftValue.isGetter) {\n // Clear the getter flag and call the getter function.\n leftValue.isGetter = false;\n state.doneGetter_ = true;\n var func = leftValue;\n return this.createGetter_(func, state.leftSide_);\n }\n }\n\n if (state.doneSetter_) {\n // Return if setter function.\n // Setter method on property has completed.\n // Ignore its return value, and use the original set value instead.\n stack.pop();\n stack[stack.length - 1].value = state.setterValue_;\n return;\n }\n\n var leftValue = Number(state.leftValue_);\n var changeValue;\n\n if (node[\"operator\"] === \"++\") {\n changeValue = leftValue + 1;\n } else if (node[\"operator\"] === \"--\") {\n changeValue = leftValue - 1;\n } else {\n throw SyntaxError(\"Unknown update expression: \" + node[\"operator\"]);\n }\n\n var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n } // Return if no setter function.\n\n\n stack.pop();\n stack[stack.length - 1].value = returnValue;\n};\n\nInterpreter.prototype[\"stepVariableDeclaration\"] = function (stack, state, node) {\n var declarations = node[\"declarations\"];\n var n = state.n_ || 0;\n var declarationNode = declarations[n];\n\n if (state.init_ && declarationNode) {\n // This setValue call never needs to deal with calling a setter function.\n // Note that this is setting the init value, not defining the variable.\n // Variable definition is done when scope is populated.\n this.setValueToScope(declarationNode[\"id\"][\"name\"], state.value);\n state.init_ = false;\n declarationNode = declarations[++n];\n }\n\n while (declarationNode) {\n // Skip any declarations that are not initialized. They have already\n // been defined as undefined in populateScope_.\n if (declarationNode[\"init\"]) {\n state.n_ = n;\n state.init_ = true;\n return new Interpreter.State(declarationNode[\"init\"], state.scope);\n }\n\n declarationNode = declarations[++n];\n }\n\n stack.pop();\n};\n\nInterpreter.prototype[\"stepWithStatement\"] = function (stack, state, node) {\n if (!state.doneObject_) {\n state.doneObject_ = true;\n return new Interpreter.State(node[\"object\"], state.scope);\n } else if (!state.doneBody_) {\n state.doneBody_ = true;\n var scope = this.createSpecialScope(state.scope, state.value);\n return new Interpreter.State(node[\"body\"], scope);\n } else {\n stack.pop();\n }\n};\n\nInterpreter.prototype[\"stepWhileStatement\"] = Interpreter.prototype[\"stepDoWhileStatement\"]; // Preserve top-level API functions from being pruned/renamed by JS compilers.\n// Add others as needed.\n// The global object ('window' in a browser, 'global' in node.js) is 'this'.\n//this['Interpreter'] = Interpreter;\n\nInterpreter.prototype[\"step\"] = Interpreter.prototype.step;\nInterpreter.prototype[\"run\"] = Interpreter.prototype.run;\nInterpreter.prototype[\"appendCode\"] = Interpreter.prototype.appendCode;\nInterpreter.prototype[\"createObject\"] = Interpreter.prototype.createObject;\nInterpreter.prototype[\"createObjectProto\"] = Interpreter.prototype.createObjectProto;\nInterpreter.prototype[\"createAsyncFunction\"] = Interpreter.prototype.createAsyncFunction;\nInterpreter.prototype[\"createNativeFunction\"] = Interpreter.prototype.createNativeFunction;\nInterpreter.prototype[\"getProperty\"] = Interpreter.prototype.getProperty;\nInterpreter.prototype[\"setProperty\"] = Interpreter.prototype.setProperty;\nInterpreter.prototype[\"nativeToPseudo\"] = Interpreter.prototype.nativeToPseudo;\nInterpreter.prototype[\"pseudoToNative\"] = Interpreter.prototype.pseudoToNative; // Obsolete. Do not use.\n\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\n\n\n//# sourceURL=webpack:///./src/JSInterpreter.js?"); /***/ }), -/* 440 */ +/* 441 */ /*!************************************!*\ !*** ./src/Gang/GangMemberTask.ts ***! \************************************/ @@ -2949,7 +2961,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberTask; });\nclass GangMemberTask {\n // Defines tasks that Gang Members can work on\n constructor(name, desc, isHacking, isCombat, params) {\n this.name = name;\n this.desc = desc; // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n\n this.isHacking = isHacking;\n this.isCombat = isCombat; // Base gain rates for respect/wanted/money\n\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0; // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\n\n this.hackWeight = params.hackWeight ? params.hackWeight : 0;\n this.strWeight = params.strWeight ? params.strWeight : 0;\n this.defWeight = params.defWeight ? params.defWeight : 0;\n this.dexWeight = params.dexWeight ? params.dexWeight : 0;\n this.agiWeight = params.agiWeight ? params.agiWeight : 0;\n this.chaWeight = params.chaWeight ? params.chaWeight : 0;\n\n if (Math.round(this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight) != 100) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n } // 1 - 100\n\n\n this.difficulty = params.difficulty ? params.difficulty : 1; // Territory Factors. Exponential factors that dictate how territory affects gains\n // Formula: Territory Mutiplier = (Territory * 100) ^ factor / 100\n // So factor should be > 1 if something should scale exponentially with territory\n // and should be < 1 if it should have diminshing returns\n\n this.territory = params.territory ? params.territory : {\n money: 1,\n respect: 1,\n wanted: 1\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/Gang/GangMemberTask.ts?"); /***/ }), -/* 441 */ +/* 442 */ /*!***************************************************!*\ !*** ./src/PersonObjects/Sleeve/SleeveHelpers.ts ***! \***************************************************/ @@ -2961,7 +2973,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return findSleevePurchasableAugs; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n\n\n\nfunction findSleevePurchasableAugs(sleeve, p) {\n // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n const ownedAugNames = sleeve.augmentations.map(e => {\n return e.name;\n });\n const availableAugs = []; // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n\n function isAvailableForSleeve(aug) {\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n return false;\n }\n\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n\n if (availableAugs.includes(aug)) {\n return false;\n }\n\n if (aug.isSpecial) {\n return false;\n }\n\n return true;\n } // If player is in a gang, then we return all augs that the player\n // has enough reputation for (since that gang offers all augs)\n\n\n if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n\n return availableAugs;\n }\n\n for (const facName of p.factions) {\n if (facName === \"Bladeburners\") {\n continue;\n }\n\n if (facName === \"Netburners\") {\n continue;\n }\n\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_2__[/* Factions */ \"a\"][facName];\n\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n }\n\n return availableAugs;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts?"); /***/ }), -/* 442 */ +/* 443 */ /*!*************************************************!*\ !*** ./src/SourceFile/PlayerOwnedSourceFile.ts ***! \*************************************************/ @@ -2973,7 +2985,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerOwnedSourceFile; });\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nclass PlayerOwnedSourceFile {\n // Source-File level\n // Source-File number\n constructor(n, level) {\n _defineProperty(this, \"lvl\", 1);\n\n _defineProperty(this, \"n\", 1);\n\n this.n = n;\n this.lvl = level;\n }\n\n}\n\n//# sourceURL=webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts?"); /***/ }), -/* 443 */ +/* 444 */ /*!****************************************!*\ !*** ./src/Programs/ProgramHelpers.ts ***! \****************************************/ @@ -2985,11 +2997,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getAvailableCreatePrograms; });\n/* harmony import */ var _Programs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Programs */ 54);\n\n//Returns the programs this player can create.\nfunction getAvailableCreatePrograms(player) {\n const programs = [];\n\n for (const key in _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"]) {\n // Non-creatable program\n const create = _Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].create;\n if (create == null) continue; // Already has program\n\n if (player.hasProgram(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key].name)) continue; // Does not meet requirements\n\n if (!create.req(player)) continue;\n programs.push(_Programs__WEBPACK_IMPORTED_MODULE_0__[/* Programs */ \"a\"][key]);\n }\n\n return programs;\n}\n\n//# sourceURL=webpack:///./src/Programs/ProgramHelpers.ts?"); /***/ }), -/* 444 */, /* 445 */, /* 446 */, /* 447 */, -/* 448 */ +/* 448 */, +/* 449 */ /*!************************************************!*\ !*** ./src/ui/React/AugmentationAccordion.tsx ***! \************************************************/ @@ -3001,7 +3013,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BBAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./BBAccordion */ 224);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/**\n * React Component for displaying a single Augmentation as an accordion.\n *\n * The header of the accordion contains the Augmentation's name (and level, if\n * applicable), and the accordion's panel contains the Augmentation's description.\n */\n\n\n\nfunction AugmentationAccordion(props) {\n let displayName = props.aug.name;\n\n if (props.level != null) {\n if (props.aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_BBAccordion__WEBPACK_IMPORTED_MODULE_1__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, displayName),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, props.aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), props.aug.stats)\n });\n}\n\n//# sourceURL=webpack:///./src/ui/React/AugmentationAccordion.tsx?"); /***/ }), -/* 449 */, /* 450 */, /* 451 */, /* 452 */, @@ -3010,7 +3021,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 455 */, /* 456 */, /* 457 */, -/* 458 */ +/* 458 */, +/* 459 */ /*!**********************************************!*\ !*** ./src/Bladeburner/ui/TeamSizePopup.tsx ***! \**********************************************/ @@ -3022,7 +3034,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TeamSizePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\nfunction TeamSizePopup(props) {\n const [teamSize, setTeamSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])();\n\n function confirmTeamSize() {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n\n if (isNaN(num) || num < 0) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_2__[/* dialogBoxCreate */ \"a\"])(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Enter the amount of team members you would like to take on this Op. If you do not have the specified number of team members, then as many as possible will be used. Note that team members may be lost during operations.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n type: \"number\",\n placeholder: \"Team size\",\n className: \"text-input\",\n onChange: event => setTeamSize(parseFloat(event.target.value))\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: confirmTeamSize\n }, \"Confirm\"));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/TeamSizePopup.tsx?"); /***/ }), -/* 459 */ +/* 460 */ /*!************************************************!*\ !*** ./src/Infiltration/ui/BlinkingCursor.tsx ***! \************************************************/ @@ -3034,7 +3046,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlinkingCursor; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction BlinkingCursor() {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n fontSize: \"1em\"\n },\n className: \"blinking-cursor\"\n }, \"|\");\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BlinkingCursor.tsx?"); /***/ }), -/* 460 */ +/* 461 */ /*!****************************************************!*\ !*** ./src/PersonObjects/Resleeving/Resleeving.ts ***! \****************************************************/ @@ -3043,10 +3055,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return purchaseResleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateResleeves; });\n/* harmony import */ var _Resleeve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Resleeve */ 936);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\n\n\n\n\n // Executes the actual re-sleeve when one is purchased\n\nfunction purchaseResleeve(r, p) {\n const cost = r.getCost();\n\n if (!p.canAfford(cost)) {\n return false;\n }\n\n p.loseMoney(cost); // Set the player's exp\n\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp; // Reset Augmentation \"owned\" data\n\n for (const augKey in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][augKey].owned = false;\n } // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n\n\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](r.augmentations[i].name));\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][r.augmentations[i].name].owned = true;\n } // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n\n\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name = p.queuedAugmentations[i].name;\n\n if (p.augmentations.filter(e => {\n return e.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && e.name === name;\n }).length >= 1) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n\n return true;\n} // Creates all of the Re-sleeves that will be available for purchase at VitaLife\n\nfunction generateResleeves() {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret = [];\n\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r = new _Resleeve__WEBPACK_IMPORTED_MODULE_0__[/* Resleeve */ \"a\"](); // Generate experience\n\n const expMult = 5 * i + 1;\n r.hacking_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.strength_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.defense_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.dexterity_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.agility_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.charisma_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000); // Generate Augs\n // Augmentation prequisites will be ignored for this\n\n const baseNumAugs = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(baseNumAugs, baseNumAugs + 2);\n const augKeys = Object.keys(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]);\n\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, augKeys.length - 1);\n const randKey = augKeys[randIndex]; // Forbidden augmentations\n\n if (randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill || randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n continue;\n }\n\n const randAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({\n name: randAug.name,\n level: 1\n });\n r.applyAugmentation(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey]);\n r.updateStatLevels(); // Remove Augmentation so that there are no duplicates\n\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeving.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return purchaseResleeve; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return generateResleeves; });\n/* harmony import */ var _Resleeve__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Resleeve */ 936);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/**\n * Implements the Re-sleeving mechanic for BitNode-10.\n * This allows the player to purchase and \"use\" new sleeves at VitaLife.\n * These new sleeves come with different starting experience and Augmentations\n * The cost of these new sleeves scales based on the exp and Augs.\n *\n * Note that this is different from the \"Sleeve mechanic\". The \"Sleeve\" mechanic\n * provides new sleeves, essentially clones. This Re-sleeving mechanic lets\n * the player purchase a new body with pre-existing Augmentations and experience\n *\n * As of right now, this feature is only available in BitNode 10\n */\n\n\n\n\n // Executes the actual re-sleeve when one is purchased\n\nfunction purchaseResleeve(r, p) {\n const cost = r.getCost();\n\n if (!p.canAfford(cost)) {\n return false;\n }\n\n p.loseMoney(cost); // Set the player's exp\n\n p.hacking_exp = r.hacking_exp;\n p.strength_exp = r.strength_exp;\n p.defense_exp = r.defense_exp;\n p.dexterity_exp = r.dexterity_exp;\n p.agility_exp = r.agility_exp;\n p.charisma_exp = r.charisma_exp; // Reset Augmentation \"owned\" data\n\n for (const augKey in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]) {\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][augKey].owned = false;\n } // Clear all of the player's augmentations, except the NeuroFlux Governor\n // which is kept\n\n\n for (let i = p.augmentations.length - 1; i >= 0; --i) {\n if (p.augmentations[i].name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n p.augmentations.splice(i, 1);\n } else {\n // NeuroFlux Governor\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor].owned = true;\n }\n }\n\n for (let i = 0; i < r.augmentations.length; ++i) {\n p.augmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](r.augmentations[i].name));\n _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][r.augmentations[i].name].owned = true;\n } // The player's purchased Augmentations should remain the same, but any purchased\n // Augmentations that are given by the resleeve should be removed so there are no duplicates\n\n\n for (let i = p.queuedAugmentations.length - 1; i >= 0; --i) {\n const name = p.queuedAugmentations[i].name;\n\n if (p.augmentations.filter(e => {\n return e.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && e.name === name;\n }).length >= 1) {\n p.queuedAugmentations.splice(i, 1);\n }\n }\n\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles(); //Multipliers get reset, so have to re-process source files too\n\n return true;\n} // Creates all of the Re-sleeves that will be available for purchase at VitaLife\n\nfunction generateResleeves() {\n const NumResleeves = 40; // Total number of Resleeves to generate\n\n const ret = [];\n\n for (let i = 0; i < NumResleeves; ++i) {\n // i will be a number indicating how \"powerful\" the Re-sleeve should be\n const r = new _Resleeve__WEBPACK_IMPORTED_MODULE_0__[/* Resleeve */ \"a\"](); // Generate experience\n\n const expMult = 5 * i + 1;\n r.hacking_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.strength_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.defense_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.dexterity_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.agility_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000);\n r.charisma_exp = expMult * Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(1000, 5000); // Generate Augs\n // Augmentation prequisites will be ignored for this\n\n const baseNumAugs = Math.max(2, Math.ceil((i + 3) / 2));\n const numAugs = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(baseNumAugs, baseNumAugs + 2);\n const augKeys = Object.keys(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"]);\n\n for (let a = 0; a < numAugs; ++a) {\n // Get a random aug\n const randIndex = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(0, augKeys.length - 1);\n const randKey = augKeys[randIndex]; // Forbidden augmentations\n\n if (randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].TheRedPill || randKey === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n continue;\n }\n\n const randAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey];\n if (randAug === null) throw new Error(`null augmentation: ${randKey}`);\n r.augmentations.push({\n name: randAug.name,\n level: 1\n });\n r.applyAugmentation(_Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][randKey]);\n r.updateStatLevels(); // Remove Augmentation so that there are no duplicates\n\n augKeys.splice(randIndex, 1);\n }\n\n ret.push(r);\n }\n\n return ret;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/Resleeving.ts?"); /***/ }), -/* 461 */ +/* 462 */ /*!********************************!*\ !*** ./src/ui/React/Modal.tsx ***! \********************************/ @@ -3055,11 +3067,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Modal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Modal */ 577);\n/* harmony import */ var _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Backdrop */ 1059);\n/* harmony import */ var _mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Fade */ 1060);\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: theme.shadows[5],\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\" // firefox\n\n }\n}));\nconst Modal = props => {\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n open: props.open,\n onClose: props.onClose,\n closeAfterTransition: true,\n className: classes.modal,\n BackdropComponent: _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n BackdropProps: {\n timeout: 100\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n in: props.open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.paper\n }, props.children)));\n};\n\n//# sourceURL=webpack:///./src/ui/React/Modal.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Modal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Modal */ 577);\n/* harmony import */ var _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Backdrop */ 1062);\n/* harmony import */ var _mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Fade */ 1063);\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\"\n },\n paper: {\n backgroundColor: theme.palette.background.paper,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: theme.shadows[5],\n padding: 2,\n maxWidth: \"80%\",\n maxHeight: \"80%\",\n overflow: \"auto\",\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\"\n },\n scrollbarWidth: \"none\" // firefox\n\n }\n}));\nconst Modal = props => {\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n open: props.open,\n onClose: props.onClose,\n closeAfterTransition: true,\n className: classes.modal,\n BackdropComponent: _mui_material_Backdrop__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"],\n BackdropProps: {\n timeout: 100\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fade__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n in: props.open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.paper\n }, props.children)));\n};\n\n//# sourceURL=webpack:///./src/ui/React/Modal.tsx?"); /***/ }), -/* 462 */, -/* 463 */ +/* 463 */, +/* 464 */ /*!***********************************!*\ !*** ./src/ui/React/HashRate.tsx ***! \***********************************/ @@ -3071,7 +3083,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashRate; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\nfunction HashRate(hashes) {\n return Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_1__[/* Hashes */ \"a\"])(`${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHashes(hashes)} / sec`);\n}\n\n//# sourceURL=webpack:///./src/ui/React/HashRate.tsx?"); /***/ }), -/* 464 */ +/* 465 */ /*!***********************************************!*\ !*** ./src/Locations/ui/TravelAgencyRoot.tsx ***! \***********************************************/ @@ -3080,11 +3092,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelAgencyRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/CityNames */ 21);\n/* harmony import */ var _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TravelConfirmationPopup */ 979);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 348);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction travel(p, router, to) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to travel to ${to}`);\n return;\n }\n\n p.loseMoney(cost);\n p.travel(to);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\"));\n router.toCity();\n}\n\nfunction createTravelPopup(p, router, city) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].SuppressTravelConfirmation) {\n travel(p, router, city);\n return;\n }\n\n const popupId = `travel-confirmation`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__[/* TravelConfirmationPopup */ \"a\"], {\n player: p,\n city: city,\n travel: () => travel(p, router, city),\n popupId: popupId\n });\n}\n\nfunction ASCIIWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__[/* WorldMap */ \"a\"], {\n currentCity: props.p.city,\n onTravel: city => createTravelPopup(props.p, props.router, city)\n }));\n}\n\nfunction ListWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), Object.values(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).filter(city => city != props.p.city).map(city => {\n const match = Object.entries(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).find(entry => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: city,\n onClick: () => createTravelPopup(props.p, props.router, city),\n style: {\n display: \"block\"\n },\n text: `Travel to ${city}`\n });\n }));\n}\n\nfunction TravelAgencyRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Travel Agency\"), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListWorldMap, {\n p: props.p,\n router: props.router\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIIWorldMap, {\n p: props.p,\n router: props.router\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelAgencyRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelAgencyRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/CityNames */ 21);\n/* harmony import */ var _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TravelConfirmationPopup */ 981);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 350);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a Travel Agency\n *\n * TThis subcomponent renders all of the buttons for traveling to different cities\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction travel(p, router, to) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost;\n\n if (!p.canAfford(cost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to travel to ${to}`);\n return;\n }\n\n p.loseMoney(cost);\n p.travel(to);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_9__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"noselect\"\n }, \"You are now in \", to, \"!\"));\n router.toCity();\n}\n\nfunction createTravelPopup(p, router, city) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].SuppressTravelConfirmation) {\n travel(p, router, city);\n return;\n }\n\n const popupId = `travel-confirmation`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TravelConfirmationPopup__WEBPACK_IMPORTED_MODULE_2__[/* TravelConfirmationPopup */ \"a\"], {\n player: p,\n city: city,\n travel: () => travel(p, router, city),\n popupId: popupId\n });\n}\n\nfunction ASCIIWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_8__[/* WorldMap */ \"a\"], {\n currentCity: props.p.city,\n onTravel: city => createTravelPopup(props.p, props.router, city)\n }));\n}\n\nfunction ListWorldMap(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"From here, you can travel to any other city! A ticket costs\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_3__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.p\n }), \".\"), Object.values(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).filter(city => city != props.p.city).map(city => {\n const match = Object.entries(_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"]).find(entry => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: city,\n onClick: () => createTravelPopup(props.p, props.router, city),\n style: {\n display: \"block\"\n },\n text: `Travel to ${city}`\n });\n }));\n}\n\nfunction TravelAgencyRoot(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Travel Agency\"), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListWorldMap, {\n p: props.p,\n router: props.router\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIIWorldMap, {\n p: props.p,\n router: props.router\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelAgencyRoot.tsx?"); /***/ }), -/* 465 */, -/* 466 */ +/* 466 */, +/* 467 */ /*!****************************************************!*\ !*** ./src/ui/React/TablePaginationActionsAll.tsx ***! \****************************************************/ @@ -3093,10 +3105,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TablePaginationActionsAll; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 96);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/FirstPage */ 565);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowLeft */ 567);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowRight */ 566);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 398);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\nfunction TablePaginationActionsAll(props) {\n const theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])();\n const {\n count,\n page,\n rowsPerPage,\n onPageChange\n } = props;\n\n const handleFirstPageButtonClick = event => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = event => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = event => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = event => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n sx: {\n flexShrink: 0,\n ml: 2.5\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleFirstPageButtonClick,\n disabled: page === 0,\n \"aria-label\": \"first page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleBackButtonClick,\n disabled: page === 0,\n \"aria-label\": \"previous page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleNextButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"next page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleLastPageButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"last page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/React/TablePaginationActionsAll.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TablePaginationActionsAll; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/styles */ 96);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/FirstPage */ 565);\n/* harmony import */ var _mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowLeft */ 567);\n/* harmony import */ var _mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/icons-material/KeyboardArrowRight */ 566);\n/* harmony import */ var _mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 399);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7__);\n\n\n\n\n\n\n\n\nfunction TablePaginationActionsAll(props) {\n const theme = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])();\n const {\n count,\n page,\n rowsPerPage,\n onPageChange\n } = props;\n\n const handleFirstPageButtonClick = event => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = event => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = event => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = event => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n sx: {\n flexShrink: 0,\n ml: 2.5\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleFirstPageButtonClick,\n disabled: page === 0,\n \"aria-label\": \"first page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleBackButtonClick,\n disabled: page === 0,\n \"aria-label\": \"previous page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleNextButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"next page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowLeft__WEBPACK_IMPORTED_MODULE_5___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_KeyboardArrowRight__WEBPACK_IMPORTED_MODULE_6___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n onClick: handleLastPageButtonClick,\n disabled: page >= Math.ceil(count / rowsPerPage) - 1,\n \"aria-label\": \"last page\"\n }, theme.direction === \"rtl\" ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_FirstPage__WEBPACK_IMPORTED_MODULE_4___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_7___default.a, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/React/TablePaginationActionsAll.tsx?"); /***/ }), -/* 467 */ +/* 468 */ /*!***************************************!*\ !*** ./src/Faction/formulas/favor.ts ***! \***************************************/ @@ -3108,7 +3120,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return favorToRep; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return repToFavor; });\n// The initial formulas was sum 0 to f of 500*1.02^f.\n// These formulas were derived on wolfram alpha.\n// Wolfram Alpha: sum from 0 to n of 500*1.02^n\n// 500 * ((pow(51, f+1)) / pow(50,f) - 50)\n// Then we use https://herbie.uwplse.org/demo/ to simplify it and prevent\n// Infinity issues.\nfunction favorToRep(f) {\n function fma(a, b, c) {\n return a * b + c;\n }\n\n const ex = fma(f, Math.log(51.0) - Math.log(50.0), Math.log(51.0));\n return fma(500.0, Math.exp(ex), -25000.0);\n} // Wolfram Alpha: 500 (50^(-n) 51^(n + 1) - 50) solve for n\n\nfunction repToFavor(r) {\n return -Math.log(25500 / (r + 25000)) / Math.log(51 / 50);\n}\n\n//# sourceURL=webpack:///./src/Faction/formulas/favor.ts?"); /***/ }), -/* 468 */ +/* 469 */ /*!*************************************!*\ !*** ./src/Bladeburner/Contract.ts ***! \*************************************/ @@ -3120,7 +3132,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Contract; });\n/* harmony import */ var _Action__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Action */ 245);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n\n\nclass Contract extends _Action__WEBPACK_IMPORTED_MODULE_0__[/* Action */ \"a\"] {\n constructor(params = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst) {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_toJSON */ \"b\"])(\"Contract\", this);\n } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Generic_fromJSON */ \"a\"])(Contract, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_1__[/* Reviver */ \"c\"].constructors.Contract = Contract;\n\n//# sourceURL=webpack:///./src/Bladeburner/Contract.ts?"); /***/ }), -/* 469 */ +/* 470 */ /*!**************************************!*\ !*** ./src/Bladeburner/data/Help.ts ***! \**************************************/ @@ -3132,7 +3144,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConsoleHelpText; });\nconst ConsoleHelpText = {\n helpList: [\"Use 'help [command]' to get more information about a particular Bladeburner console command.\", \"\", \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\", \" clear/cls Clear the console\", \" help [cmd] Display this help text, or help text for a specific command\", \" log [en/dis] [type] Enable or disable logging for events and actions\", \" skill [action] [name] Level or display info about your Bladeburner skills\", \" start [type] [name] Start a Bladeburner action/task\", \" stop Stops your current Bladeburner action/task\"],\n automate: [\"automate [var] [val] [hi/low]\", \"\", \"A simple way to automate your Bladeburner actions. This console command can be used \" + \"to automatically start an action when your stamina rises above a certain threshold, and \" + \"automatically switch to another action when your stamina drops below another threshold.\", \" automate status - Check the current status of your automation and get a brief description of what it'll do\", \" automate en - Enable the automation feature\", \" automate dis - Disable the automation feature\", \"\", \"There are four properties that must be set for this automation to work properly. Here is how to set them:\", \"\", \" automate stamina 100 high\", \" automate contract Tracking high\", \" automate stamina 50 low\", \" automate general 'Field Analysis' low\", \"\", \"Using the four console commands above will set the automation to perform Tracking contracts \" + \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" + \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" + \"exactly match whatever the name is in the UI.\"],\n clear: [\"clear\", \"\", \"Clears the console\"],\n cls: [\"cls\", \"\", \"Clears the console\"],\n help: [\"help [command]\", \"\", \"Running 'help' with no arguments displays the general help text, which lists all console commands \" + \"and a brief description of what they do. A command can be specified to get more specific help text \" + \"about that particular command. For example:\", \"\", \" help automate\", \"\", \"will display specific information about using the automate console command\"],\n log: [\"log [en/dis] [type]\", \"\", \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" + \"in the console. There are also random events that are logged in the console as well. The five categories of \" + \"things that get logged are:\", \"\", \"[general, contracts, ops, blackops, events]\", \"\", \"The logging for these categories can be enabled or disabled like so:\", \"\", \" log dis contracts - Disables logging that occurs when contracts are completed\", \" log en contracts - Enables logging that occurs when contracts are completed\", \" log dis events - Disables logging for Bladeburner random events\", \"\", \"Logging can be universally enabled/disabled using the 'all' keyword:\", \"\", \" log dis all\", \" log en all\"],\n skill: [\"skill [action] [name]\", \"\", \"Level or display information about your skills.\", \"\", \"To display information about all of your skills and your multipliers, use:\", \"\", \" skill list\", \"\", \"To display information about a specific skill, specify the name of the skill afterwards. \" + \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" + \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\", \"\", \" skill list Reaper
\" + \" skill list 'Digital Observer'\", \"\", \"This console command can also be used to level up skills:\", \"\", \" skill level [skill name]\"],\n start: [\"start [type] [name]\", \"\", \"Start an action. An action is specified by its type and its name. The \" + \"name is case-sensitive. It must appear exactly as it does in the UI. If \" + \"the name of the action has whitespace, enclose it in double quotation marks. \" + \"Valid action types include:\", \"\", \"[general, contract, op, blackop]\", \"\", \"Examples:\", \"\", \" start contract Tracking\", \" start op 'Undercover Operation'\"],\n stop: [\"stop\", \"\", \"Stop your current action and go idle.\"]\n};\n\n//# sourceURL=webpack:///./src/Bladeburner/data/Help.ts?"); /***/ }), -/* 470 */ +/* 471 */ /*!*****************************************!*\ !*** ./src/Corporation/ResearchTree.ts ***! \*****************************************/ @@ -3141,11 +3153,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ResearchTree; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResearchMap */ 284);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\n\n\nclass Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n // Whether or not this Research has been unlocked\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n // Name of the Research held in this Node\n constructor(p = {\n cost: 0,\n text: \"\"\n }) {\n _defineProperty(this, \"children\", []);\n\n _defineProperty(this, \"cost\", 0);\n\n _defineProperty(this, \"researched\", false);\n\n _defineProperty(this, \"parent\", null);\n\n _defineProperty(this, \"text\", \"\");\n\n if (_ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n) {\n this.children.push(n);\n n.parent = this;\n } // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n\n\n createTreantMarkup() {\n const childrenArray = [];\n\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n } // Determine what css class this Node should have in the diagram\n\n\n let htmlClass = \"tooltip\";\n\n if (this.researched) {\n htmlClass += \" researched\";\n } else if (this.parent && this.parent.researched === false) {\n htmlClass += \" locked\";\n } else {\n htmlClass += \" unlocked\";\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][this.text];\n const sanitizedName = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML: `
` + `${this.text}
${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(this.cost, \"0,0\")} Scientific Research` + `` + `${research.desc}` + `` + `
`,\n text: {\n name: this.text\n }\n };\n } // Recursive function for finding a Node with the specified text\n\n\n findNode(text) {\n // Is this the Node?\n if (this.text === text) {\n return this;\n } // Recursively search chilren\n\n\n let res = null;\n\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n) {\n this.parent = n;\n }\n\n} // A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\n\nclass ResearchTree {\n constructor() {\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"root\", null);\n }\n\n // Return an object that contains a Tree markup for TreantJS (using the JSON approach)\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup() {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n return {\n chart: {\n container: \"\"\n },\n nodeStructure: treeMarkup\n };\n } // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n\n\n getAllNodes() {\n const res = [];\n const queue = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Get total multipliers from this Research Tree\n\n\n getAdvertisingMultiplier() {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier() {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier() {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier() {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier() {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier() {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier() {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier() {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier() {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier() {\n return this.getMultiplierHelper(\"storageMult\");\n } // Helper function for all the multiplier getter fns\n\n\n getMultiplierHelper(propName) {\n let res = 1;\n\n if (this.root == null) {\n return res;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift(); // If the Node has not been researched, there's no need to\n // process it or its children\n\n if (node == null || !node.researched) {\n continue;\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][node.text]; // Safety checks\n\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult = research[propName];\n\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n\n\n findNode(name) {\n if (this.root == null) {\n return null;\n }\n\n return this.root.findNode(name);\n } // Marks a Node as researched\n\n\n research(name) {\n if (this.root == null) {\n return;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n } // Set the tree's Root Node\n\n\n setRoot(root) {\n this.root = root;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Corporation/ResearchTree.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Node; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return ResearchTree; });\n/* harmony import */ var _ResearchMap__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ResearchMap */ 285);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n// Defines a \"Research Tree\"\n// Each Industry has a unique Research Tree\n// Each Node in the Research Trees only holds the name(s) of Research,\n// not an actual Research object. The name can be used to obtain a reference\n// to the corresponding Research object using the ResearchMap\n\n\nclass Node {\n // All child Nodes in the tree\n // The Research held in this Node is a prerequisite for all Research in\n // child Nodes\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n // Whether or not this Research has been unlocked\n // Parent node in the tree\n // The parent node defines the prerequisite Research (there can only be one)\n // Set as null for no prerequisites\n // Name of the Research held in this Node\n constructor(p = {\n cost: 0,\n text: \"\"\n }) {\n _defineProperty(this, \"children\", []);\n\n _defineProperty(this, \"cost\", 0);\n\n _defineProperty(this, \"researched\", false);\n\n _defineProperty(this, \"parent\", null);\n\n _defineProperty(this, \"text\", \"\");\n\n if (_ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][p.text] == null) {\n throw new Error(`Invalid Research name used when constructing ResearchTree Node: ${p.text}`);\n }\n\n this.text = p.text;\n this.cost = p.cost;\n\n if (p.children && p.children.length > 0) {\n this.children = p.children;\n }\n\n if (p.parent != null) {\n this.parent = p.parent;\n }\n }\n\n addChild(n) {\n this.children.push(n);\n n.parent = this;\n } // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n\n\n createTreantMarkup() {\n const childrenArray = [];\n\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n } // Determine what css class this Node should have in the diagram\n\n\n let htmlClass = \"tooltip\";\n\n if (this.researched) {\n htmlClass += \" researched\";\n } else if (this.parent && this.parent.researched === false) {\n htmlClass += \" locked\";\n } else {\n htmlClass += \" unlocked\";\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][this.text];\n const sanitizedName = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML: `
` + `${this.text}
${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].format(this.cost, \"0,0\")} Scientific Research` + `` + `${research.desc}` + `` + `
`,\n text: {\n name: this.text\n }\n };\n } // Recursive function for finding a Node with the specified text\n\n\n findNode(text) {\n // Is this the Node?\n if (this.text === text) {\n return this;\n } // Recursively search chilren\n\n\n let res = null;\n\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n) {\n this.parent = n;\n }\n\n} // A ResearchTree defines all available Research in an Industry\n// The root node in a Research Tree must always be the \"Hi-Tech R&D Laboratory\"\n\nclass ResearchTree {\n constructor() {\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"root\", null);\n }\n\n // Return an object that contains a Tree markup for TreantJS (using the JSON approach)\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup() {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n return {\n chart: {\n container: \"\"\n },\n nodeStructure: treeMarkup\n };\n } // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n\n\n getAllNodes() {\n const res = [];\n const queue = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Get total multipliers from this Research Tree\n\n\n getAdvertisingMultiplier() {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier() {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier() {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier() {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier() {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier() {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier() {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier() {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier() {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier() {\n return this.getMultiplierHelper(\"storageMult\");\n } // Helper function for all the multiplier getter fns\n\n\n getMultiplierHelper(propName) {\n let res = 1;\n\n if (this.root == null) {\n return res;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift(); // If the Node has not been researched, there's no need to\n // process it or its children\n\n if (node == null || !node.researched) {\n continue;\n }\n\n const research = _ResearchMap__WEBPACK_IMPORTED_MODULE_0__[/* ResearchMap */ \"a\"][node.text]; // Safety checks\n\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult = research[propName];\n\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n } // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n\n\n findNode(name) {\n if (this.root == null) {\n return null;\n }\n\n return this.root.findNode(name);\n } // Marks a Node as researched\n\n\n research(name) {\n if (this.root == null) {\n return;\n }\n\n const queue = [];\n queue.push(this.root);\n\n while (queue.length !== 0) {\n const node = queue.shift();\n\n if (node == null) {\n continue;\n }\n\n if (node.text === name) {\n node.researched = true;\n this.researched[name] = true;\n return;\n }\n\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n console.warn(`ResearchTree.research() did not find the specified Research node for: ${name}`);\n } // Set the tree's Root Node\n\n\n setRoot(root) {\n this.root = root;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Corporation/ResearchTree.ts?"); /***/ }), -/* 471 */, -/* 472 */ +/* 472 */, +/* 473 */ /*!*************************************************!*\ !*** ./src/StockMarket/StockMarketConstants.ts ***! \*************************************************/ @@ -3157,8 +3169,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TicksPerCycle; });\n/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nconst TicksPerCycle = 75;\n\n//# sourceURL=webpack:///./src/StockMarket/StockMarketConstants.ts?"); /***/ }), -/* 473 */, -/* 474 */ +/* 474 */, +/* 475 */ /*!***********************************************!*\ !*** ./src/Company/GetNextCompanyPosition.ts ***! \***********************************************/ @@ -3169,18 +3181,6 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "use strict"; eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getNextCompanyPositionHelper; });\n/* harmony import */ var _CompanyPositions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./CompanyPositions */ 63);\n// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\n\nfunction getNextCompanyPositionHelper(currPos) {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName = currPos.nextPosition;\n\n if (nextPosName == null) {\n return null;\n }\n\n return _CompanyPositions__WEBPACK_IMPORTED_MODULE_0__[/* CompanyPositions */ \"a\"][nextPosName];\n}\n\n//# sourceURL=webpack:///./src/Company/GetNextCompanyPosition.ts?"); -/***/ }), -/* 475 */ -/*!*****************************!*\ - !*** ./src/ui/GameRoot.tsx ***! - \*****************************/ -/*! exports provided: Router, GameRoot */ -/*! exports used: GameRoot, Router */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Router; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../SaveObject */ 218);\n/* harmony import */ var _ExportBonus__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ExportBonus */ 247);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Locations/Locations */ 223);\n/* harmony import */ var _Prestige__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Prestige */ 274);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../StockMarket/BuyingAndSelling */ 155);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../StockMarket/StockMarket */ 74);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _Router__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./Router */ 25);\n/* harmony import */ var _Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../Sidebar/ui/SidebarRoot */ 717);\n/* harmony import */ var _Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Augmentation/ui/AugmentationsRoot */ 783);\n/* harmony import */ var _DevMenu__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../DevMenu */ 792);\n/* harmony import */ var _Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerRoot */ 846);\n/* harmony import */ var _Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../Gang/ui/GangRoot */ 866);\n/* harmony import */ var _Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Corporation/ui/CorporationRoot */ 881);\n/* harmony import */ var _Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../Infiltration/ui/InfiltrationRoot */ 921);\n/* harmony import */ var _PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../PersonObjects/Resleeving/ui/ResleeveRoot */ 935);\n/* harmony import */ var _WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./WorkInProgressRoot */ 938);\n/* harmony import */ var _ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../ui/React/GameOptionsRoot */ 939);\n/* harmony import */ var _PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../PersonObjects/Sleeve/ui/SleeveRoot */ 948);\n/* harmony import */ var _Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../Hacknet/ui/HacknetRoot */ 957);\n/* harmony import */ var _Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../Locations/ui/GenericLocation */ 558);\n/* harmony import */ var _Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../Locations/ui/City */ 990);\n/* harmony import */ var _Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../Programs/ui/ProgramsRoot */ 991);\n/* harmony import */ var _ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../ScriptEditor/ui/Root */ 992);\n/* harmony import */ var _Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../Milestones/ui/MilestonesRoot */ 1008);\n/* harmony import */ var _Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../Terminal/ui/TerminalRoot */ 1009);\n/* harmony import */ var _Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../Tutorial/ui/TutorialRoot */ 1014);\n/* harmony import */ var _ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../ui/ActiveScripts/ActiveScriptsRoot */ 1015);\n/* harmony import */ var _Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../Faction/ui/FactionsRoot */ 1025);\n/* harmony import */ var _Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../Faction/ui/FactionRoot */ 1026);\n/* harmony import */ var _CharacterInfo__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./CharacterInfo */ 1041);\n/* harmony import */ var _Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../Locations/ui/TravelAgencyRoot */ 464);\n/* harmony import */ var _StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../StockMarket/ui/StockMarketRoot */ 1042);\n/* harmony import */ var _BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../BitNode/ui/BitverseRoot */ 1051);\n/* harmony import */ var _React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./React/CharacterOverview */ 1054);\n/* harmony import */ var _Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../Bladeburner/ui/BladeburnerCinematic */ 1057);\n/* harmony import */ var _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../Netscript/WorkerScripts */ 153);\n/* harmony import */ var _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../Faction/FactionHelpers */ 91);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../RedPill */ 221);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])({\n root: {\n \"-ms-overflow-style\": \"none\"\n /* for Internet Explorer, Edge */\n ,\n \"scrollbar-width\": \"none\"\n /* for Firefox */\n ,\n margin: theme.spacing(0)\n }\n}));\nlet filename = \"\";\nlet code = \"\";\nlet Router = {\n page: () => {\n throw new Error(\"Router called before initialization\");\n },\n toActiveScripts: () => {\n throw new Error(\"Router called before initialization\");\n },\n toAugmentations: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBitVerse: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburner: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCharacterInfo: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCity: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCorporation: () => {\n throw new Error(\"Router called before initialization\");\n },\n toCreateProgram: () => {\n throw new Error(\"Router called before initialization\");\n },\n toDevMenu: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFaction: () => {\n throw new Error(\"Router called before initialization\");\n },\n toFactions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGameOptions: () => {\n throw new Error(\"Router called before initialization\");\n },\n toGang: () => {\n throw new Error(\"Router called before initialization\");\n },\n toHacknetNodes: () => {\n throw new Error(\"Router called before initialization\");\n },\n toInfiltration: () => {\n throw new Error(\"Router called before initialization\");\n },\n toJob: () => {\n throw new Error(\"Router called before initialization\");\n },\n toMilestones: () => {\n throw new Error(\"Router called before initialization\");\n },\n toResleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toScriptEditor: () => {\n throw new Error(\"Router called before initialization\");\n },\n toSleeves: () => {\n throw new Error(\"Router called before initialization\");\n },\n toStockMarket: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTerminal: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTravel: () => {\n throw new Error(\"Router called before initialization\");\n },\n toTutorial: () => {\n throw new Error(\"Router called before initialization\");\n },\n toWork: () => {\n throw new Error(\"Router called before initialization\");\n },\n toBladeburnerCinematic: () => {\n throw new Error(\"Router called before initialization\");\n },\n toLocation: () => {\n throw new Error(\"Router called before initialization\");\n }\n};\n\nfunction determineStartPage(player) {\n if (player.isWorking) return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work;\n return _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal;\n}\n\nfunction GameRoot({\n player,\n engine,\n terminal\n}) {\n const classes = useStyles();\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(determineStartPage(player));\n const contentRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(player.currentWorkFactionName ? _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName] : undefined);\n if (faction === undefined && page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction) throw new Error(\"Trying to go to a page without the proper setup\");\n const [flume, setFlume] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [quick, setQuick] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [location, setLocation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(undefined);\n if (location === undefined && (page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location || page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job)) throw new Error(\"Trying to go to a page without the proper setup\");\n const [cinematicText, setCinematicText] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n Router = {\n page: () => page,\n toActiveScripts: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts),\n toAugmentations: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations),\n toBladeburner: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner),\n toCharacterInfo: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats),\n toCorporation: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation),\n toCreateProgram: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram),\n toDevMenu: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu),\n toFaction: faction => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions),\n toGameOptions: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options),\n toGang: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang),\n toHacknetNodes: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet),\n toMilestones: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones),\n toResleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves),\n toScriptEditor: (fn, c) => {\n filename = fn;\n code = c;\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript);\n },\n toSleeves: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves),\n toStockMarket: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket),\n toTerminal: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal),\n toTutorial: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial),\n toJob: () => {\n setLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_5__[/* Locations */ \"a\"][player.companyName]);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job);\n },\n toCity: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City);\n },\n toTravel: () => {\n player.gotoLocation(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_4__[/* LocationName */ \"a\"].TravelAgency);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel);\n },\n toBitVerse: (flume, quick) => {\n setFlume(flume);\n setQuick(quick);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse);\n },\n toInfiltration: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration);\n },\n toWork: () => setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work),\n toBladeburnerCinematic: () => {\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: location => {\n setLocation(location);\n setPage(_Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location);\n }\n };\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n filename = \"\";\n code = \"\";\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Player.Provider, {\n value: player\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Context__WEBPACK_IMPORTED_MODULE_48__[/* Context */ \"a\"].Router.Provider, {\n value: Router\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_CharacterOverview__WEBPACK_IMPORTED_MODULE_43__[/* CharacterOverview */ \"a\"], {\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb)\n }), page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BitVerse ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BitNode_ui_BitverseRoot__WEBPACK_IMPORTED_MODULE_42__[/* BitverseRoot */ \"a\"], {\n flume: flume,\n enter: _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* enterBitNode */ \"a\"],\n quick: quick\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Infiltration ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Infiltration_ui_InfiltrationRoot__WEBPACK_IMPORTED_MODULE_23__[/* InfiltrationRoot */ \"a\"], {\n location: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].BladeburnerCinematic ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerCinematic__WEBPACK_IMPORTED_MODULE_44__[/* BladeburnerCinematic */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Work ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkInProgressRoot__WEBPACK_IMPORTED_MODULE_25__[/* WorkInProgressRoot */ \"a\"], null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n display: \"flex\",\n flexDirection: \"row\",\n width: \"100%\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Sidebar_ui_SidebarRoot__WEBPACK_IMPORTED_MODULE_17__[/* SidebarRoot */ \"a\"], {\n player: player,\n router: Router,\n page: page\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n ref: contentRef,\n className: classes.root,\n flexGrow: 1,\n display: \"block\",\n width: \"100%\",\n px: 1,\n height: \"100vh\"\n }, page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Terminal ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Terminal_ui_TerminalRoot__WEBPACK_IMPORTED_MODULE_34__[/* TerminalRoot */ \"a\"], {\n terminal: terminal,\n router: Router,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Sleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Sleeve_ui_SleeveRoot__WEBPACK_IMPORTED_MODULE_27__[/* SleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Stats ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CharacterInfo__WEBPACK_IMPORTED_MODULE_39__[/* CharacterInfo */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateScript ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptEditor_ui_Root__WEBPACK_IMPORTED_MODULE_32__[/* Root */ \"a\"], {\n filename: filename,\n code: code,\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].ActiveScripts ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_ActiveScripts_ActiveScriptsRoot__WEBPACK_IMPORTED_MODULE_36__[/* ActiveScriptsRoot */ \"a\"], {\n workerScripts: _Netscript_WorkerScripts__WEBPACK_IMPORTED_MODULE_45__[/* workerScripts */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Hacknet ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Hacknet_ui_HacknetRoot__WEBPACK_IMPORTED_MODULE_28__[/* HacknetRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].CreateProgram ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Programs_ui_ProgramsRoot__WEBPACK_IMPORTED_MODULE_31__[/* ProgramsRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Factions ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionsRoot__WEBPACK_IMPORTED_MODULE_37__[/* FactionsRoot */ \"a\"], {\n player: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Faction ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Faction_ui_FactionRoot__WEBPACK_IMPORTED_MODULE_38__[/* FactionRoot */ \"a\"], {\n faction: faction,\n startHackingMissionFn: _Faction_FactionHelpers__WEBPACK_IMPORTED_MODULE_46__[/* startHackingMission */ \"g\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Milestones ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Milestones_ui_MilestonesRoot__WEBPACK_IMPORTED_MODULE_33__[/* MilestonesRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Tutorial ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Tutorial_ui_TutorialRoot__WEBPACK_IMPORTED_MODULE_35__[/* TutorialRoot */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].DevMenu ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DevMenu__WEBPACK_IMPORTED_MODULE_19__[/* DevMenuRoot */ \"a\"], {\n player: player,\n engine: engine,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Gang ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Gang_ui_GangRoot__WEBPACK_IMPORTED_MODULE_21__[/* GangRoot */ \"a\"], {\n gang: player.gang\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Corporation ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Corporation_ui_CorporationRoot__WEBPACK_IMPORTED_MODULE_22__[/* CorporationRoot */ \"a\"], {\n corp: player.corporation,\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Bladeburner ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Bladeburner_ui_BladeburnerRoot__WEBPACK_IMPORTED_MODULE_20__[/* BladeburnerRoot */ \"a\"], {\n bladeburner: player.bladeburner\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Resleeves ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PersonObjects_Resleeving_ui_ResleeveRoot__WEBPACK_IMPORTED_MODULE_24__[/* ResleeveRoot */ \"a\"], {\n player: player\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Travel ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_40__[/* TravelAgencyRoot */ \"a\"], {\n p: player,\n router: Router\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].StockMarket ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockMarket_ui_StockMarketRoot__WEBPACK_IMPORTED_MODULE_41__[/* StockMarketRoot */ \"a\"], {\n buyStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* buyStock */ \"a\"],\n buyStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* shortStock */ \"d\"],\n cancelOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* cancelOrder */ \"c\"],\n eventEmitterForReset: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* eventEmitterForUiReset */ \"e\"],\n initStockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* initStockMarketFnForReact */ \"g\"],\n p: player,\n placeOrder: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* placeOrder */ \"j\"],\n sellStockLong: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellStock */ \"c\"],\n sellStockShort: _StockMarket_BuyingAndSelling__WEBPACK_IMPORTED_MODULE_10__[/* sellShort */ \"b\"],\n stockMarket: _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_11__[/* StockMarket */ \"a\"]\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].City ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_City__WEBPACK_IMPORTED_MODULE_30__[/* LocationCity */ \"a\"], null) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Job ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Location ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Locations_ui_GenericLocation__WEBPACK_IMPORTED_MODULE_29__[/* GenericLocation */ \"a\"], {\n loc: location\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Options ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_GameOptionsRoot__WEBPACK_IMPORTED_MODULE_26__[/* GameOptionsRoot */ \"a\"], {\n player: player,\n save: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].saveGame(engine.indexedDb),\n delete: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].deleteGame(engine.indexedDb),\n export: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame(),\n import: () => _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].importGame(),\n forceKill: () => {\n for (const hostname of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"])) {\n _Server_AllServers__WEBPACK_IMPORTED_MODULE_8__[/* AllServers */ \"b\"][hostname].runningScripts = [];\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Forcefully deleted all running scripts. Please save and refresh page.\");\n },\n softReset: () => {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Soft Reset!\");\n Object(_Prestige__WEBPACK_IMPORTED_MODULE_6__[/* prestigeAugmentation */ \"a\"])();\n Router.toTerminal();\n }\n }) : page === _Router__WEBPACK_IMPORTED_MODULE_16__[/* Page */ \"a\"].Augmentations ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Augmentation_ui_AugmentationsRoot__WEBPACK_IMPORTED_MODULE_18__[/* AugmentationsRoot */ \"a\"], {\n exportGameFn: () => {\n _SaveObject__WEBPACK_IMPORTED_MODULE_2__[/* saveObject */ \"b\"].exportGame();\n Object(_ExportBonus__WEBPACK_IMPORTED_MODULE_3__[/* onExport */ \"c\"])(player);\n },\n installAugmentationsFn: () => {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* installAugmentations */ \"d\"])();\n Router.toTerminal();\n }\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], null, \"Cannot load\"))))));\n}\n\n//# sourceURL=webpack:///./src/ui/GameRoot.tsx?"); - /***/ }), /* 476 */ /*!************************************!*\ @@ -3191,7 +3191,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createStatusText; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 209);\n\n\nconst threeSeconds = 3000;\nlet x;\n/**\n * Displays a status message to the player for approximately 3 seconds.\n * @param text The status text to display\n */\n\nfunction createStatusText(text) {\n if (x !== undefined) {\n clearTimeout(x); // Likely not needed due to clearTimeout, but just in case...\n\n x = undefined;\n }\n\n const statusElement = Object(_utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"status-text\");\n statusElement.style.display = \"block\";\n statusElement.classList.add(\"status-text\");\n statusElement.innerText = text;\n\n const handler = () => {\n statusElement.innerText = \"\";\n statusElement.style.display = \"none\";\n statusElement.classList.remove(\"status-text\");\n };\n\n x = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(handler, threeSeconds);\n}\n\n//# sourceURL=webpack:///./src/ui/createStatusText.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return createStatusText; });\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/uiHelpers/getElementById */ 210);\n\n\nconst threeSeconds = 3000;\nlet x;\n/**\n * Displays a status message to the player for approximately 3 seconds.\n * @param text The status text to display\n */\n\nfunction createStatusText(text) {\n if (x !== undefined) {\n clearTimeout(x); // Likely not needed due to clearTimeout, but just in case...\n\n x = undefined;\n }\n\n const statusElement = Object(_utils_uiHelpers_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(\"status-text\");\n statusElement.style.display = \"block\";\n statusElement.classList.add(\"status-text\");\n statusElement.innerText = text;\n\n const handler = () => {\n statusElement.innerText = \"\";\n statusElement.style.display = \"none\";\n statusElement.classList.remove(\"status-text\");\n };\n\n x = Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_0__[/* setTimeoutRef */ \"a\"])(handler, threeSeconds);\n}\n\n//# sourceURL=webpack:///./src/ui/createStatusText.ts?"); /***/ }), /* 477 */, @@ -3376,7 +3376,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeChildrenFromElement; });\n/* harmony import */ var _helpers_isString__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isString */ 82);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 209);\n\n\n/**\n * Clears out all children from the provided element.\n * If a string is passed in, it will treat it as an ID and search for the element to delete all children from.\n * @param el The element or ID of an element to remove all children from.\n */\n\nfunction removeChildrenFromElement(el) {\n if (el === null) {\n return;\n }\n\n try {\n const elem = Object(_helpers_isString__WEBPACK_IMPORTED_MODULE_0__[/* isString */ \"a\"])(el) ? Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(el) : el;\n\n if (elem instanceof Element) {\n while (elem.firstChild !== null) {\n elem.removeChild(elem.firstChild);\n }\n }\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.debug(e);\n return;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeChildrenFromElement.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeChildrenFromElement; });\n/* harmony import */ var _helpers_isString__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../helpers/isString */ 82);\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./getElementById */ 210);\n\n\n/**\n * Clears out all children from the provided element.\n * If a string is passed in, it will treat it as an ID and search for the element to delete all children from.\n * @param el The element or ID of an element to remove all children from.\n */\n\nfunction removeChildrenFromElement(el) {\n if (el === null) {\n return;\n }\n\n try {\n const elem = Object(_helpers_isString__WEBPACK_IMPORTED_MODULE_0__[/* isString */ \"a\"])(el) ? Object(_getElementById__WEBPACK_IMPORTED_MODULE_1__[/* getElementById */ \"a\"])(el) : el;\n\n if (elem instanceof Element) {\n while (elem.firstChild !== null) {\n elem.removeChild(elem.firstChild);\n }\n }\n } catch (e) {\n // tslint:disable-next-line:no-console\n console.debug(e);\n return;\n }\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeChildrenFromElement.ts?"); /***/ }), /* 530 */, @@ -3449,7 +3449,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GenericLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CompanyLocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyLocation */ 966);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 968);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 969);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 970);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 971);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 973);\n/* harmony import */ var _TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TravelAgencyRoot */ 464);\n/* harmony import */ var _UniversityLocation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UniversityLocation */ 980);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 981);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/React/CorruptableText */ 989);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction GenericLocation({\n loc\n}) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Router();\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n\n function getLocationSpecificContent() {\n const content = [];\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Company)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CompanyLocation__WEBPACK_IMPORTED_MODULE_1__[/* CompanyLocation */ \"a\"], {\n key: \"companylocation\",\n locName: loc.name\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Gym)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GymLocation__WEBPACK_IMPORTED_MODULE_2__[/* GymLocation */ \"a\"], {\n key: \"gymlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Hospital)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HospitalLocation__WEBPACK_IMPORTED_MODULE_3__[/* HospitalLocation */ \"a\"], {\n key: \"hospitallocation\",\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Slums)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SlumsLocation__WEBPACK_IMPORTED_MODULE_4__[/* SlumsLocation */ \"a\"], {\n key: \"slumslocation\"\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Special)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SpecialLocation__WEBPACK_IMPORTED_MODULE_5__[/* SpecialLocation */ \"a\"], {\n key: \"speciallocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TechVendor)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__[/* TechVendorLocation */ \"a\"], {\n key: \"techvendorlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TravelAgency)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__[/* TravelAgencyRoot */ \"a\"], {\n key: \"travelagencylocation\",\n p: player,\n router: router\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].University)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_UniversityLocation__WEBPACK_IMPORTED_MODULE_8__[/* UniversityLocation */ \"a\"], {\n key: \"universitylocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Casino)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CasinoLocation__WEBPACK_IMPORTED_MODULE_9__[/* CasinoLocation */ \"a\"], {\n key: \"casinoLocation\",\n p: player\n }));\n }\n\n return content;\n }\n\n const locContent = getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(ip);\n const backdoorInstalled = server !== null && Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* isBackdoorInstalled */ \"d\"])(server);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__[/* StdButton */ \"a\"], {\n onClick: () => router.toCity(),\n style: {\n display: \"block\"\n },\n text: \"Return to World\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: \"noselect\"\n }, backdoorInstalled && !_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].DisableTextEffects ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__[/* CorruptableText */ \"a\"], {\n content: loc.name\n }) : loc.name), locContent);\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GenericLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CompanyLocation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CompanyLocation */ 968);\n/* harmony import */ var _GymLocation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GymLocation */ 970);\n/* harmony import */ var _HospitalLocation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HospitalLocation */ 971);\n/* harmony import */ var _SlumsLocation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SlumsLocation */ 972);\n/* harmony import */ var _SpecialLocation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SpecialLocation */ 973);\n/* harmony import */ var _TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TechVendorLocation */ 975);\n/* harmony import */ var _TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TravelAgencyRoot */ 465);\n/* harmony import */ var _UniversityLocation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./UniversityLocation */ 982);\n/* harmony import */ var _CasinoLocation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./CasinoLocation */ 983);\n/* harmony import */ var _LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../LocationTypeEnum */ 41);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/React/CorruptableText */ 991);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a location's UI\n *\n * This is a \"router\" component of sorts, meaning it deduces the type of\n * location that is being rendered and then creates the proper component(s) for that.\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction GenericLocation({\n loc\n}) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Router();\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_16__[/* use */ \"b\"].Player();\n /**\n * Determine what needs to be rendered for this location based on the locations\n * type. Returns an array of React components that should be rendered\n */\n\n function getLocationSpecificContent() {\n const content = [];\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Company)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CompanyLocation__WEBPACK_IMPORTED_MODULE_1__[/* CompanyLocation */ \"a\"], {\n key: \"companylocation\",\n locName: loc.name\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Gym)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_GymLocation__WEBPACK_IMPORTED_MODULE_2__[/* GymLocation */ \"a\"], {\n key: \"gymlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Hospital)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_HospitalLocation__WEBPACK_IMPORTED_MODULE_3__[/* HospitalLocation */ \"a\"], {\n key: \"hospitallocation\",\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Slums)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SlumsLocation__WEBPACK_IMPORTED_MODULE_4__[/* SlumsLocation */ \"a\"], {\n key: \"slumslocation\"\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Special)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_SpecialLocation__WEBPACK_IMPORTED_MODULE_5__[/* SpecialLocation */ \"a\"], {\n key: \"speciallocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TechVendor)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TechVendorLocation__WEBPACK_IMPORTED_MODULE_6__[/* TechVendorLocation */ \"a\"], {\n key: \"techvendorlocation\",\n loc: loc,\n p: player\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].TravelAgency)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_TravelAgencyRoot__WEBPACK_IMPORTED_MODULE_7__[/* TravelAgencyRoot */ \"a\"], {\n key: \"travelagencylocation\",\n p: player,\n router: router\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].University)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_UniversityLocation__WEBPACK_IMPORTED_MODULE_8__[/* UniversityLocation */ \"a\"], {\n key: \"universitylocation\",\n loc: loc\n }));\n }\n\n if (loc.types.includes(_LocationTypeEnum__WEBPACK_IMPORTED_MODULE_10__[/* LocationType */ \"a\"].Casino)) {\n content.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CasinoLocation__WEBPACK_IMPORTED_MODULE_9__[/* CasinoLocation */ \"a\"], {\n key: \"casinoLocation\",\n p: player\n }));\n }\n\n return content;\n }\n\n const locContent = getLocationSpecificContent();\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_12__[/* SpecialServerIps */ \"a\"].getIp(loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(ip);\n const backdoorInstalled = server !== null && Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* isBackdoorInstalled */ \"d\"])(server);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_14__[/* StdButton */ \"a\"], {\n onClick: () => router.toCity(),\n style: {\n display: \"block\"\n },\n text: \"Return to World\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", {\n className: \"noselect\"\n }, backdoorInstalled && !_Settings_Settings__WEBPACK_IMPORTED_MODULE_11__[/* Settings */ \"a\"].DisableTextEffects ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_CorruptableText__WEBPACK_IMPORTED_MODULE_15__[/* CorruptableText */ \"a\"], {\n content: loc.name\n }) : loc.name), locContent);\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GenericLocation.tsx?"); /***/ }), /* 559 */ @@ -3473,7 +3473,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiPaper; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 257);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n backgroundColor: \"rgb(30, 30, 30)\",\n border: \"2px solid #000\",\n borderRadius: \"10px\",\n display: \"inline-block\",\n flexWrap: \"wrap\",\n padding: \"10px\"\n }\n});\nconst MuiPaper = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiPaper.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiPaper; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 258);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's Button component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n backgroundColor: \"rgb(30, 30, 30)\",\n border: \"2px solid #000\",\n borderRadius: \"10px\",\n display: \"inline-block\",\n flexWrap: \"wrap\",\n padding: \"10px\"\n }\n});\nconst MuiPaper = props => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiPaper.tsx?"); /***/ }), /* 561 */, @@ -3553,7 +3553,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeLoadingScreen; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 209);\n/* harmony import */ var _removeElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElementById */ 211);\n\n\n/**\n * Routes the player from the Loading screen to the main game content.\n */\n\nfunction removeLoadingScreen() {\n // TODO: Have this manipulate CSS classes instead of direct styles\n Object(_removeElementById__WEBPACK_IMPORTED_MODULE_1__[/* removeElementById */ \"a\"])(\"loader\");\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(\"entire-game-container\").style.visibility = \"visible\";\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeLoadingScreen.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return removeLoadingScreen; });\n/* harmony import */ var _getElementById__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getElementById */ 210);\n/* harmony import */ var _removeElementById__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./removeElementById */ 212);\n\n\n/**\n * Routes the player from the Loading screen to the main game content.\n */\n\nfunction removeLoadingScreen() {\n // TODO: Have this manipulate CSS classes instead of direct styles\n Object(_removeElementById__WEBPACK_IMPORTED_MODULE_1__[/* removeElementById */ \"a\"])(\"loader\");\n Object(_getElementById__WEBPACK_IMPORTED_MODULE_0__[/* getElementById */ \"a\"])(\"entire-game-container\").style.visibility = \"visible\";\n}\n\n//# sourceURL=webpack:///./utils/uiHelpers/removeLoadingScreen.ts?"); /***/ }), /* 575 */, @@ -3667,7 +3667,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerObject; });\n/* harmony import */ var _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PlayerObjectAugmentationMethods */ 645);\n/* harmony import */ var _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PlayerObjectBladeburnerMethods */ 646);\n/* harmony import */ var _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerObjectCorporationMethods */ 709);\n/* harmony import */ var _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PlayerObjectGangMethods */ 710);\n/* harmony import */ var _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PlayerObjectGeneralMethods */ 711);\n/* harmony import */ var _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlayerObjectServerMethods */ 715);\n/* harmony import */ var _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Hacknet/HashManager */ 287);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 291);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\nfunction PlayerObject() {\n //Skills and stats\n this.hacking_skill = 1; //Combat stats\n\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1; //Labor stats\n\n this.charisma = 1; //Special stats\n\n this.intelligence = 0; //Hacking multipliers\n\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1; //Experience and multipliers\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1; //Money\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"](1000); //IP Address of Starting (home) computer\n\n this.homeComputer = \"\"; //Location information\n\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__[/* CityName */ \"a\"].Sector12;\n this.location = \"\"; // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n\n this.jobs = {}; // Company at which player is CURRENTLY working (only valid when the player is actively working)\n\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies map\n // Servers\n\n this.currentServer = \"\"; //IP address of Server currently being accessed through terminal\n\n this.purchasedServers = []; //IP Addresses of purchased servers\n // Hacknet Nodes/Servers\n\n this.hacknetNodes = []; // Note: For Hacknet Servers, this array holds the IP addresses of the servers\n\n this.hashManager = new _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__[/* HashManager */ \"a\"](); //Factions\n\n this.factions = []; //Names of all factions player has joined\n\n this.factionInvitations = []; //Outstanding faction invitations\n //Augmentations\n\n this.queuedAugmentations = [];\n this.augmentations = [];\n this.sourceFiles = []; //Crime statistics\n\n this.numPeopleKilled = 0;\n this.karma = 0;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1; //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n this.className = \"\";\n this.crimeType = \"\";\n this.timeWorked = 0; //in ms\n\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n this.work_money_mult = 1; //Hacknet Node multipliers\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1; //Stock Market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; //Gang\n\n this.gang = null; //Corporation\n\n this.corporation = null; //Bladeburner\n\n this.bladeburner = null;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1; //Field Analysis Only\n\n this.bladeburner_success_chance_mult = 1; // Sleeves & Re-sleeving\n\n this.sleeves = [];\n this.resleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant\n //bitnode\n\n this.bitNodeN = 1; //Flags for determining whether certain \"thresholds\" have been achieved\n\n this.firstFacInvRecvd = false;\n this.firstAugPurchased = false;\n this.firstTimeTraveled = false;\n this.firstProgramAvailable = false; //Used to store the last update time.\n\n this.lastUpdate = 0;\n this.totalPlaytime = 0;\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0; // Keep track of where money comes from\n\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from since last-installed Augmentation\n\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from for this entire BitNode run\n // Production since last Augmentation installation\n\n this.scriptProdSinceLastAug = 0;\n this.exploits = [];\n} // Apply player methods to the prototype using Object.assign()\n\nObject.assign(PlayerObject.prototype, _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__, _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__, _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__, _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__, _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__, _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__);\n\nPlayerObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"PlayerObject\", this);\n};\n\nPlayerObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(PlayerObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.PlayerObject = PlayerObject;\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObject.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerObject; });\n/* harmony import */ var _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./PlayerObjectAugmentationMethods */ 645);\n/* harmony import */ var _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PlayerObjectBladeburnerMethods */ 646);\n/* harmony import */ var _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PlayerObjectCorporationMethods */ 709);\n/* harmony import */ var _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PlayerObjectGangMethods */ 710);\n/* harmony import */ var _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PlayerObjectGeneralMethods */ 711);\n/* harmony import */ var _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlayerObjectServerMethods */ 715);\n/* harmony import */ var _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Hacknet/HashManager */ 288);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 292);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../utils/JSONReviver */ 15);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! decimal.js */ 77);\n\n\n\n\n\n\n\n\n\n\n\nfunction PlayerObject() {\n //Skills and stats\n this.hacking_skill = 1; //Combat stats\n\n this.hp = 10;\n this.max_hp = 10;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1; //Labor stats\n\n this.charisma = 1; //Special stats\n\n this.intelligence = 0; //Hacking multipliers\n\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1; //Experience and multipliers\n\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.intelligence_exp = 0;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1; //Money\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"](1000); //IP Address of Starting (home) computer\n\n this.homeComputer = \"\"; //Location information\n\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_7__[/* CityName */ \"a\"].Sector12;\n this.location = \"\"; // Jobs that the player holds\n // Map of company name (key) -> name of company position (value. Just the name, not the CompanyPosition object)\n // The CompanyPosition name must match a key value in CompanyPositions\n\n this.jobs = {}; // Company at which player is CURRENTLY working (only valid when the player is actively working)\n\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies map\n // Servers\n\n this.currentServer = \"\"; //IP address of Server currently being accessed through terminal\n\n this.purchasedServers = []; //IP Addresses of purchased servers\n // Hacknet Nodes/Servers\n\n this.hacknetNodes = []; // Note: For Hacknet Servers, this array holds the IP addresses of the servers\n\n this.hashManager = new _Hacknet_HashManager__WEBPACK_IMPORTED_MODULE_6__[/* HashManager */ \"a\"](); //Factions\n\n this.factions = []; //Names of all factions player has joined\n\n this.factionInvitations = []; //Outstanding faction invitations\n //Augmentations\n\n this.queuedAugmentations = [];\n this.augmentations = [];\n this.sourceFiles = []; //Crime statistics\n\n this.numPeopleKilled = 0;\n this.karma = 0;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1; //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n this.className = \"\";\n this.crimeType = \"\";\n this.timeWorked = 0; //in ms\n\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n this.work_money_mult = 1; //Hacknet Node multipliers\n\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1; //Stock Market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; //Gang\n\n this.gang = null; //Corporation\n\n this.corporation = null; //Bladeburner\n\n this.bladeburner = null;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1; //Field Analysis Only\n\n this.bladeburner_success_chance_mult = 1; // Sleeves & Re-sleeving\n\n this.sleeves = [];\n this.resleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenant\n //bitnode\n\n this.bitNodeN = 1; //Flags for determining whether certain \"thresholds\" have been achieved\n\n this.firstFacInvRecvd = false;\n this.firstAugPurchased = false;\n this.firstTimeTraveled = false;\n this.firstProgramAvailable = false; //Used to store the last update time.\n\n this.lastUpdate = 0;\n this.totalPlaytime = 0;\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0; // Keep track of where money comes from\n\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from since last-installed Augmentation\n\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_8__[/* MoneySourceTracker */ \"a\"](); // Where money comes from for this entire BitNode run\n // Production since last Augmentation installation\n\n this.scriptProdSinceLastAug = 0;\n this.exploits = [];\n} // Apply player methods to the prototype using Object.assign()\n\nObject.assign(PlayerObject.prototype, _PlayerObjectGeneralMethods__WEBPACK_IMPORTED_MODULE_4__, _PlayerObjectServerMethods__WEBPACK_IMPORTED_MODULE_5__, _PlayerObjectBladeburnerMethods__WEBPACK_IMPORTED_MODULE_1__, _PlayerObjectCorporationMethods__WEBPACK_IMPORTED_MODULE_2__, _PlayerObjectGangMethods__WEBPACK_IMPORTED_MODULE_3__, _PlayerObjectAugmentationMethods__WEBPACK_IMPORTED_MODULE_0__);\n\nPlayerObject.prototype.toJSON = function () {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_toJSON */ \"b\"])(\"PlayerObject\", this);\n};\n\nPlayerObject.fromJSON = function (value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Generic_fromJSON */ \"a\"])(PlayerObject, value.data);\n};\n\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_9__[/* Reviver */ \"c\"].constructors.PlayerObject = PlayerObject;\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObject.js?"); /***/ }), /* 645 */ @@ -3775,7 +3775,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContractPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _CopyableText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CopyableText */ 123);\n\n\n\n\nfunction CodingContractPopup(props) {\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event) {\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent\" seems like the right type but\n // whatever ...\n const value = event.target.value;\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n }\n }\n\n const contractType = _CodingContracts__WEBPACK_IMPORTED_MODULE_2__[/* CodingContractTypes */ \"d\"][props.c.type];\n const description = [];\n\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries()) description.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n dangerouslySetInnerHTML: {\n __html: value + \"
\"\n }\n }));\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* CopyableText */ \"b\"], {\n value: props.c.type,\n tag: _CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* ClickableTag */ \"a\"].Tag_h1\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to solve a Coding Contract. You have \", props.c.getMaxNumTries() - props.c.tries, \" tries remaining, after which the contract will self-destruct.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, description), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n style: {\n width: \"50%\",\n marginTop: \"8px\"\n },\n autoFocus: true,\n placeholder: \"Enter Solution here\",\n value: answer,\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => props.onAttempt(answer)\n }, \"Solve\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CodingContractPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContractPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _CopyableText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CopyableText */ 124);\n\n\n\n\nfunction CodingContractPopup(props) {\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event) {\n // React just won't cooperate on this one.\n // \"React.KeyboardEvent\" seems like the right type but\n // whatever ...\n const value = event.target.value;\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_1__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n }\n }\n\n const contractType = _CodingContracts__WEBPACK_IMPORTED_MODULE_2__[/* CodingContractTypes */ \"d\"][props.c.type];\n const description = [];\n\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries()) description.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i,\n dangerouslySetInnerHTML: {\n __html: value + \"
\"\n }\n }));\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* CopyableText */ \"b\"], {\n value: props.c.type,\n tag: _CopyableText__WEBPACK_IMPORTED_MODULE_3__[/* ClickableTag */ \"a\"].Tag_h1\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to solve a Coding Contract. You have \", props.c.getMaxNumTries() - props.c.tries, \" tries remaining, after which the contract will self-destruct.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, description), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n style: {\n width: \"50%\",\n marginTop: \"8px\"\n },\n autoFocus: true,\n placeholder: \"Enter Solution here\",\n value: answer,\n onChange: onChange,\n onKeyDown: onKeyDown\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => props.onAttempt(answer)\n }, \"Solve\"));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CodingContractPopup.tsx?"); /***/ }), /* 654 */ @@ -3871,7 +3871,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ITerminal */ 250);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/LogBox */ 213);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Script/ScriptHelpers */ 169);\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HelpText */ 390);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Parser */ 522);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Hacking */ 81);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _commands_alias__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./commands/alias */ 662);\n/* harmony import */ var _commands_analyze__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./commands/analyze */ 663);\n/* harmony import */ var _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./commands/backdoor */ 664);\n/* harmony import */ var _commands_buy__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./commands/buy */ 665);\n/* harmony import */ var _commands_cat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./commands/cat */ 666);\n/* harmony import */ var _commands_cd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./commands/cd */ 667);\n/* harmony import */ var _commands_check__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./commands/check */ 668);\n/* harmony import */ var _commands_connect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./commands/connect */ 669);\n/* harmony import */ var _commands_download__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./commands/download */ 670);\n/* harmony import */ var _commands_expr__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./commands/expr */ 673);\n/* harmony import */ var _commands_free__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./commands/free */ 523);\n/* harmony import */ var _commands_hack__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./commands/hack */ 674);\n/* harmony import */ var _commands_help__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./commands/help */ 675);\n/* harmony import */ var _commands_home__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./commands/home */ 676);\n/* harmony import */ var _commands_hostname__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./commands/hostname */ 677);\n/* harmony import */ var _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./commands/ifconfig */ 678);\n/* harmony import */ var _commands_kill__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./commands/kill */ 679);\n/* harmony import */ var _commands_killall__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./commands/killall */ 680);\n/* harmony import */ var _commands_ls__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./commands/ls */ 524);\n/* harmony import */ var _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./commands/lscpu */ 681);\n/* harmony import */ var _commands_mem__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./commands/mem */ 682);\n/* harmony import */ var _commands_mv__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./commands/mv */ 683);\n/* harmony import */ var _commands_nano__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./commands/nano */ 684);\n/* harmony import */ var _commands_ps__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./commands/ps */ 685);\n/* harmony import */ var _commands_rm__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./commands/rm */ 686);\n/* harmony import */ var _commands_run__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./commands/run */ 525);\n/* harmony import */ var _commands_scan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./commands/scan */ 526);\n/* harmony import */ var _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./commands/scananalyze */ 689);\n/* harmony import */ var _commands_scp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./commands/scp */ 690);\n/* harmony import */ var _commands_sudov__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./commands/sudov */ 691);\n/* harmony import */ var _commands_tail__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./commands/tail */ 692);\n/* harmony import */ var _commands_theme__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./commands/theme */ 693);\n/* harmony import */ var _commands_top__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./commands/top */ 694);\n/* harmony import */ var _commands_unalias__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./commands/unalias */ 695);\n/* harmony import */ var _commands_wget__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./commands/wget */ 696);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Terminal {\n constructor() {\n _defineProperty(this, \"hasChanges\", false);\n\n _defineProperty(this, \"action\", null);\n\n _defineProperty(this, \"commandHistory\", []);\n\n _defineProperty(this, \"commandHistoryIndex\", 0);\n\n _defineProperty(this, \"outputHistory\", [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")]);\n\n _defineProperty(this, \"contractOpen\", false);\n\n _defineProperty(this, \"currDir\", \"/\");\n }\n\n process(router, player, cycles) {\n if (this.action === null) return;\n this.action.timeLeft -= _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed * cycles / 1000;\n this.hasChanges = true;\n if (this.action.timeLeft < 0) this.finishAction(router, player, false);\n }\n\n pollChanges() {\n if (this.hasChanges) {\n this.hasChanges = false;\n return true;\n }\n\n return false;\n }\n\n append(item) {\n this.outputHistory.push(item);\n\n if (this.outputHistory.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity) {\n this.outputHistory.slice(this.outputHistory.length - _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity);\n }\n }\n\n print(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"primary\"));\n this.hasChanges = true;\n }\n\n error(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"error\"));\n this.hasChanges = true;\n }\n\n startHack(player) {\n // Hacking through Terminal should be faster than hacking through a script\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"h\");\n }\n\n startBackdoor(player) {\n // Backdoor should take the same amount of time as hack\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"b\");\n }\n\n startAnalyze() {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n, action) {\n this.action = new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* TTimer */ \"c\"](n, action);\n } // Complete the hack/analyze command\n\n\n finishHack(router, player, cancelled = false) {\n if (cancelled) return;\n const server = player.getCurrentServer(); // Calculate whether hack was successful\n\n const hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingExpGain */ \"c\"])(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n let moneyGained = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained);\n player.recordMoneySource(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].IntelligenceTerminalHackBaseExpGain);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].ServerFortifyAmount);\n this.print(`Hack successful! Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} hacking exp`);\n } else {\n // Failure\n // player only gains 25% exp for failure? TODO Can change this later to balance\n player.gainHackingExp(expGainedOnFailure);\n this.print(`Failed to hack ${server.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} hacking exp`);\n }\n }\n\n finishBackdoor(router, player, cancelled = false) {\n if (!cancelled) {\n const server = player.getCurrentServer();\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player, cancelled = false) {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = !isHacknet && currServ.hasAdminRights || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatServerSecurity(security) : \"N/A\"));\n const hackingChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime, true) : \"N/A\"));\n this.print(`Total money available on server: ${!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(currServ.moneyAvailable) : \"N/A\"}`);\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n\n finishAction(router, player, cancelled = false) {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n this.print(this.getProgressText());\n\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n\n this.action = null;\n }\n\n getFile(player, filename) {\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename) {\n const path = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* evaluateFilePath */ \"b\"])(filename, this.cwd());\n\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* isInRootDirectory */ \"e\"])(path)) {\n return Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* removeLeadingSlash */ \"h\"])(path);\n }\n\n return path;\n }\n\n getScript(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd() {\n return this.currDir;\n }\n\n setcwd(dir) {\n this.currDir = dir;\n this.hasChanges = true;\n }\n\n async runContract(player, contractName) {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n\n serv.removeContract(contract);\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Failure:\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n this.print(\"Contract

FAILED

- Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`Contract

FAILED

- ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player, depth = 1, all = false) {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \"); // Map of all servers to keep track of which have been visited\n\n const visited = {};\n\n for (const ip in _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__[/* AllServers */ \"b\"]) {\n visited[ip] = 0;\n }\n\n const stack = [];\n const depthQueue = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.ip] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.ip] = 1;\n }\n\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServerOnNetwork */ \"c\"])(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n\n if (d == 0) {\n continue;\n } // Don't print current server\n\n\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n\n if (player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_2__[/* Programs */ \"a\"].AutoLink.name)) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Link */ \"a\"](s.hostname));\n } else {\n this.print(s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n\n this.print(`${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`);\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n\n this.print(dashes + \"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatRAM(s.maxRam));\n this.print(\" \");\n }\n\n const links = document.getElementsByClassName(\"scan-analyze-link\");\n\n for (let i = 0; i < links.length; ++i) {\n (() => {\n const hostname = links[i].innerHTML.toString();\n links[i].addEventListener(\"onclick\", () => {\n if (this.action !== null) {\n return;\n }\n\n this.connectToServer(player, hostname);\n });\n })(); // Immediate invocation\n\n }\n }\n\n connectToServer(player, server) {\n const serv = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(server);\n\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n\n if (player.getCurrentServer().hostname == \"darkweb\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__[/* checkIfConnectedToDarkweb */ \"b\"])(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router, player, commands) {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n // Handle Terminal History - multiple commands should be saved as one\n\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommands */ \"b\"])(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear() {\n // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")];\n this.hasChanges = true;\n }\n\n prestige() {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router, player, command) {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n } // Allow usage of ./\n\n\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n } // Only split the first space\n\n\n const commandArray = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommand */ \"a\"])(command);\n\n if (commandArray.length == 0) {\n return;\n }\n\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].isRunning) {\n const n00dlesServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* GetServerByHostname */ \"a\"])(\"n00dles\");\n\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n\n switch (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].currStep) {\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n _HelpText__WEBPACK_IMPORTED_MODULE_12__[/* TerminalHelpText */ \"b\"].forEach(line => this.print(line));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n Object(_commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n Object(_commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n this.executeScanAnalyzeCommand(player, 1);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n this.executeScanAnalyzeCommand(player, 2);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalConnect:\n if (commandArray.length == 2) {\n if (commandArray[0] == \"connect\" && (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.ip)) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = n00dlesServ.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n if (commandArray.length !== 1) {\n this.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n this.startAnalyze();\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n n00dlesServ.hasAdminRights = true;\n this.print(\"NUKE successful! Gained root access to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n this.startHack(player);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n router.toScriptEditor(\"n00dles.script\", \"\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n Object(_commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n Object(_commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n // Check that the script exists on this machine\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__[/* findRunningScript */ \"a\"])(\"n00dles.script\", [], player.getCurrentServer());\n\n if (runningScript == null) {\n this.print(\"Error: No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_9__[/* logBoxCreate */ \"a\"])(runningScript);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n default:\n this.print(\"Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it\");\n return;\n }\n\n return;\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n\n /* Command parser */\n\n\n const commandName = commandArray[0];\n\n if (typeof commandName === \"number\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands = {\n alias: _commands_alias__WEBPACK_IMPORTED_MODULE_21__[/* alias */ \"a\"],\n analyze: _commands_analyze__WEBPACK_IMPORTED_MODULE_22__[/* analyze */ \"a\"],\n backdoor: _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__[/* backdoor */ \"a\"],\n buy: _commands_buy__WEBPACK_IMPORTED_MODULE_24__[/* buy */ \"a\"],\n cat: _commands_cat__WEBPACK_IMPORTED_MODULE_25__[/* cat */ \"a\"],\n cd: _commands_cd__WEBPACK_IMPORTED_MODULE_26__[/* cd */ \"a\"],\n check: _commands_check__WEBPACK_IMPORTED_MODULE_27__[/* check */ \"a\"],\n cls: () => this.clear(),\n clear: () => this.clear(),\n connect: _commands_connect__WEBPACK_IMPORTED_MODULE_28__[/* connect */ \"a\"],\n download: _commands_download__WEBPACK_IMPORTED_MODULE_29__[/* download */ \"a\"],\n expr: _commands_expr__WEBPACK_IMPORTED_MODULE_30__[/* expr */ \"a\"],\n free: _commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"],\n hack: _commands_hack__WEBPACK_IMPORTED_MODULE_32__[/* hack */ \"a\"],\n help: _commands_help__WEBPACK_IMPORTED_MODULE_33__[/* help */ \"a\"],\n home: _commands_home__WEBPACK_IMPORTED_MODULE_34__[/* home */ \"a\"],\n hostname: _commands_hostname__WEBPACK_IMPORTED_MODULE_35__[/* hostname */ \"a\"],\n ifconfig: _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__[/* ifconfig */ \"a\"],\n kill: _commands_kill__WEBPACK_IMPORTED_MODULE_37__[/* kill */ \"a\"],\n killall: _commands_killall__WEBPACK_IMPORTED_MODULE_38__[/* killall */ \"a\"],\n ls: _commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"],\n lscpu: _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__[/* lscpu */ \"a\"],\n mem: _commands_mem__WEBPACK_IMPORTED_MODULE_41__[/* mem */ \"a\"],\n mv: _commands_mv__WEBPACK_IMPORTED_MODULE_42__[/* mv */ \"a\"],\n nano: _commands_nano__WEBPACK_IMPORTED_MODULE_43__[/* nano */ \"a\"],\n ps: _commands_ps__WEBPACK_IMPORTED_MODULE_44__[/* ps */ \"a\"],\n rm: _commands_rm__WEBPACK_IMPORTED_MODULE_45__[/* rm */ \"a\"],\n run: _commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"],\n scan: _commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"],\n \"scan-analyze\": _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__[/* scananalyze */ \"a\"],\n scp: _commands_scp__WEBPACK_IMPORTED_MODULE_49__[/* scp */ \"a\"],\n sudov: _commands_sudov__WEBPACK_IMPORTED_MODULE_50__[/* sudov */ \"a\"],\n tail: _commands_tail__WEBPACK_IMPORTED_MODULE_51__[/* tail */ \"a\"],\n theme: _commands_theme__WEBPACK_IMPORTED_MODULE_52__[/* theme */ \"a\"],\n top: _commands_top__WEBPACK_IMPORTED_MODULE_53__[/* top */ \"a\"],\n unalias: _commands_unalias__WEBPACK_IMPORTED_MODULE_54__[/* unalias */ \"a\"],\n wget: _commands_wget__WEBPACK_IMPORTED_MODULE_55__[/* wget */ \"a\"]\n };\n const f = commands[commandName.toLowerCase()];\n\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText() {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__[/* createProgressBarText */ \"a\"])({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/Terminal.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Terminal; });\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ITerminal */ 250);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Programs/Programs */ 54);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../CodingContracts */ 79);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../DarkWeb/DarkWeb */ 390);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../utils/LogBox */ 214);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../InteractiveTutorial */ 49);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Script/ScriptHelpers */ 169);\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HelpText */ 391);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Parser__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Parser */ 522);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../Settings/Settings */ 34);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _Hacking__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../Hacking */ 81);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _commands_alias__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./commands/alias */ 662);\n/* harmony import */ var _commands_analyze__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./commands/analyze */ 663);\n/* harmony import */ var _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./commands/backdoor */ 664);\n/* harmony import */ var _commands_buy__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./commands/buy */ 665);\n/* harmony import */ var _commands_cat__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./commands/cat */ 666);\n/* harmony import */ var _commands_cd__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./commands/cd */ 667);\n/* harmony import */ var _commands_check__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./commands/check */ 668);\n/* harmony import */ var _commands_connect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./commands/connect */ 669);\n/* harmony import */ var _commands_download__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./commands/download */ 670);\n/* harmony import */ var _commands_expr__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./commands/expr */ 673);\n/* harmony import */ var _commands_free__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./commands/free */ 523);\n/* harmony import */ var _commands_hack__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./commands/hack */ 674);\n/* harmony import */ var _commands_help__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./commands/help */ 675);\n/* harmony import */ var _commands_home__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./commands/home */ 676);\n/* harmony import */ var _commands_hostname__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./commands/hostname */ 677);\n/* harmony import */ var _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./commands/ifconfig */ 678);\n/* harmony import */ var _commands_kill__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./commands/kill */ 679);\n/* harmony import */ var _commands_killall__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./commands/killall */ 680);\n/* harmony import */ var _commands_ls__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./commands/ls */ 524);\n/* harmony import */ var _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./commands/lscpu */ 681);\n/* harmony import */ var _commands_mem__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./commands/mem */ 682);\n/* harmony import */ var _commands_mv__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./commands/mv */ 683);\n/* harmony import */ var _commands_nano__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./commands/nano */ 684);\n/* harmony import */ var _commands_ps__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./commands/ps */ 685);\n/* harmony import */ var _commands_rm__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./commands/rm */ 686);\n/* harmony import */ var _commands_run__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./commands/run */ 525);\n/* harmony import */ var _commands_scan__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./commands/scan */ 526);\n/* harmony import */ var _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./commands/scananalyze */ 689);\n/* harmony import */ var _commands_scp__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./commands/scp */ 690);\n/* harmony import */ var _commands_sudov__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./commands/sudov */ 691);\n/* harmony import */ var _commands_tail__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./commands/tail */ 692);\n/* harmony import */ var _commands_theme__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./commands/theme */ 693);\n/* harmony import */ var _commands_top__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./commands/top */ 694);\n/* harmony import */ var _commands_unalias__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./commands/unalias */ 695);\n/* harmony import */ var _commands_wget__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./commands/wget */ 696);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Terminal {\n constructor() {\n _defineProperty(this, \"hasChanges\", false);\n\n _defineProperty(this, \"action\", null);\n\n _defineProperty(this, \"commandHistory\", []);\n\n _defineProperty(this, \"commandHistoryIndex\", 0);\n\n _defineProperty(this, \"outputHistory\", [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")]);\n\n _defineProperty(this, \"contractOpen\", false);\n\n _defineProperty(this, \"currDir\", \"/\");\n }\n\n process(router, player, cycles) {\n if (this.action === null) return;\n this.action.timeLeft -= _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"]._idleSpeed * cycles / 1000;\n this.hasChanges = true;\n if (this.action.timeLeft < 0) this.finishAction(router, player, false);\n }\n\n pollChanges() {\n if (this.hasChanges) {\n this.hasChanges = false;\n return true;\n }\n\n return false;\n }\n\n append(item) {\n this.outputHistory.push(item);\n\n if (this.outputHistory.length > _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity) {\n this.outputHistory.slice(this.outputHistory.length - _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].MaxTerminalCapacity);\n }\n }\n\n print(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"primary\"));\n this.hasChanges = true;\n }\n\n error(s) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](s, \"error\"));\n this.hasChanges = true;\n }\n\n startHack(player) {\n // Hacking through Terminal should be faster than hacking through a script\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"h\");\n }\n\n startBackdoor(player) {\n // Backdoor should take the same amount of time as hack\n this.startAction(Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(player.getCurrentServer(), player) / 4, \"b\");\n }\n\n startAnalyze() {\n this.print(\"Analyzing system...\");\n this.startAction(1, \"a\");\n }\n\n startAction(n, action) {\n this.action = new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* TTimer */ \"c\"](n, action);\n } // Complete the hack/analyze command\n\n\n finishHack(router, player, cancelled = false) {\n if (cancelled) return;\n const server = player.getCurrentServer(); // Calculate whether hack was successful\n\n const hackChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingExpGain */ \"c\"])(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n\n if (rand < hackChance) {\n // Success!\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n let moneyGained = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculatePercentMoneyHacked */ \"e\"])(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained);\n player.recordMoneySource(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / _Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].IntelligenceTerminalHackBaseExpGain);\n server.fortify(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].ServerFortifyAmount);\n this.print(`Hack successful! Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(moneyGained)} and ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnSuccess)} hacking exp`);\n } else {\n // Failure\n // player only gains 25% exp for failure? TODO Can change this later to balance\n player.gainHackingExp(expGainedOnFailure);\n this.print(`Failed to hack ${server.hostname}. Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatExp(expGainedOnFailure)} hacking exp`);\n }\n }\n\n finishBackdoor(router, player, cancelled = false) {\n if (!cancelled) {\n const server = player.getCurrentServer();\n\n if (_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] && _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_15__[/* SpecialServerNames */ \"b\"].WorldDaemon] == server.ip) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n\n router.toBitVerse(false, false);\n return;\n }\n\n server.backdoorInstalled = true;\n this.print(\"Backdoor successful!\");\n }\n }\n\n finishAnalyze(player, cancelled = false) {\n if (!cancelled) {\n const currServ = player.getCurrentServer();\n const isHacknet = currServ instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n this.print(currServ.hostname + \": \");\n const org = currServ.organizationName;\n this.print(\"Organization name: \" + (!isHacknet ? org : \"player\"));\n const hasAdminRights = !isHacknet && currServ.hasAdminRights || isHacknet;\n this.print(\"Root Access: \" + (hasAdminRights ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatServerSecurity(security) : \"N/A\"));\n const hackingChance = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingChance */ \"b\"])(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = Object(_Hacking__WEBPACK_IMPORTED_MODULE_18__[/* calculateHackingTime */ \"d\"])(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__[/* convertTimeMsToTimeElapsedString */ \"b\"])(hackingTime, true) : \"N/A\"));\n this.print(`Total money available on server: ${!isHacknet ? _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatMoney(currServ.moneyAvailable) : \"N/A\"}`);\n const numPort = currServ.numOpenPortsRequired;\n this.print(\"Required number of open ports for NUKE: \" + (!isHacknet ? numPort : \"N/A\"));\n this.print(\"SSH port: \" + (currServ.sshPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"FTP port: \" + (currServ.ftpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SMTP port: \" + (currServ.smtpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"HTTP port: \" + (currServ.httpPortOpen ? \"Open\" : \"Closed\"));\n this.print(\"SQL port: \" + (currServ.sqlPortOpen ? \"Open\" : \"Closed\"));\n }\n }\n\n finishAction(router, player, cancelled = false) {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n this.print(this.getProgressText());\n\n if (this.action.action === \"h\") {\n this.finishHack(router, player, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n\n this.action = null;\n }\n\n getFile(player, filename) {\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_4__[/* isScriptFilename */ \"a\"])(filename)) {\n return this.getScript(player, filename);\n }\n\n if (filename.endsWith(\".lit\")) {\n return this.getLitFile(player, filename);\n }\n\n if (filename.endsWith(\".txt\")) {\n return this.getTextFile(player, filename);\n }\n\n return null;\n }\n\n getFilepath(filename) {\n const path = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* evaluateFilePath */ \"b\"])(filename, this.cwd());\n\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* isInRootDirectory */ \"e\"])(path)) {\n return Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_7__[/* removeLeadingSlash */ \"h\"])(path);\n }\n\n return path;\n }\n\n getScript(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const script of s.scripts) {\n if (filepath === script.filename) {\n return script;\n }\n }\n\n return null;\n }\n\n getTextFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const txt of s.textFiles) {\n if (filepath === txt.fn) {\n return txt;\n }\n }\n\n return null;\n }\n\n getLitFile(player, filename) {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\n\n for (const lit of s.messages) {\n if (typeof lit === \"string\" && filepath === lit) {\n return lit;\n }\n }\n\n return null;\n }\n\n cwd() {\n return this.currDir;\n }\n\n setcwd(dir) {\n this.currDir = dir;\n this.hasChanges = true;\n }\n\n async runContract(player, contractName) {\n // There's already an opened contract\n if (this.contractOpen) {\n return this.error(\"There's already a Coding Contract in Progress\");\n }\n\n const serv = player.getCurrentServer();\n const contract = serv.getContract(contractName);\n\n if (contract == null) {\n return this.error(\"No such contract\");\n }\n\n this.contractOpen = true;\n const res = await contract.prompt();\n\n switch (res) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n\n serv.removeContract(contract);\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Failure:\n ++contract.tries;\n\n if (contract.tries >= contract.getMaxNumTries()) {\n this.print(\"Contract

FAILED

- Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.print(`Contract

FAILED

- ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_3__[/* CodingContractResult */ \"b\"].Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player, depth = 1, all = false) {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \"); // Map of all servers to keep track of which have been visited\n\n const visited = {};\n\n for (const ip in _Server_AllServers__WEBPACK_IMPORTED_MODULE_6__[/* AllServers */ \"b\"]) {\n visited[ip] = 0;\n }\n\n const stack = [];\n const depthQueue = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\n\n while (stack.length != 0) {\n const s = stack.pop();\n if (!s) continue;\n const d = depthQueue.pop();\n if (d === undefined) continue;\n const isHacknet = s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServer */ \"a\"];\n\n if (!all && s.purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.ip] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.ip] = 1;\n }\n\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServerOnNetwork */ \"c\"])(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n\n if (d == 0) {\n continue;\n } // Don't print current server\n\n\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n\n if (player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_2__[/* Programs */ \"a\"].AutoLink.name)) {\n this.append(new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Link */ \"a\"](s.hostname));\n } else {\n this.print(s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n\n this.print(`${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + s.requiredHackingSkill : \"\"}`);\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + s.numOpenPortsRequired);\n }\n\n this.print(dashes + \"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_19__[/* numeralWrapper */ \"a\"].formatRAM(s.maxRam));\n this.print(\" \");\n }\n\n const links = document.getElementsByClassName(\"scan-analyze-link\");\n\n for (let i = 0; i < links.length; ++i) {\n (() => {\n const hostname = links[i].innerHTML.toString();\n links[i].addEventListener(\"onclick\", () => {\n if (this.action !== null) {\n return;\n }\n\n this.connectToServer(player, hostname);\n });\n })(); // Immediate invocation\n\n }\n }\n\n connectToServer(player, server) {\n const serv = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* getServer */ \"b\"])(server);\n\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n\n if (player.getCurrentServer().hostname == \"darkweb\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_8__[/* checkIfConnectedToDarkweb */ \"b\"])(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router, player, commands) {\n // Sanitize input\n commands = commands.trim();\n commands = commands.replace(/\\s\\s+/g, \" \"); // Replace all extra whitespace in command with a single space\n // Handle Terminal History - multiple commands should be saved as one\n\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n }\n\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommands */ \"b\"])(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear() {\n // TODO: remove this once we figure out the height issue.\n this.outputHistory = [new _ITerminal__WEBPACK_IMPORTED_MODULE_0__[/* Output */ \"b\"](`Bitburner v${_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].Version}`, \"primary\")];\n this.hasChanges = true;\n }\n\n prestige() {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router, player, command) {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n } // Allow usage of ./\n\n\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n } // Only split the first space\n\n\n const commandArray = Object(_Parser__WEBPACK_IMPORTED_MODULE_14__[/* ParseCommand */ \"a\"])(command);\n\n if (commandArray.length == 0) {\n return;\n }\n\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].isRunning) {\n const n00dlesServ = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_13__[/* GetServerByHostname */ \"a\"])(\"n00dles\");\n\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n return;\n }\n\n switch (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* ITutorial */ \"a\"].currStep) {\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n _HelpText__WEBPACK_IMPORTED_MODULE_12__[/* TerminalHelpText */ \"b\"].forEach(line => this.print(line));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n Object(_commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n Object(_commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n this.executeScanAnalyzeCommand(player, 1);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n this.executeScanAnalyzeCommand(player, 2);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalConnect:\n if (commandArray.length == 2) {\n if (commandArray[0] == \"connect\" && (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.ip)) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = n00dlesServ.ip;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n if (commandArray.length !== 1) {\n this.print(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n\n this.startAnalyze();\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n n00dlesServ.hasAdminRights = true;\n this.print(\"NUKE successful! Gained root access to n00dles\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n this.startHack(player);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n router.toScriptEditor(\"n00dles.script\", \"\");\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n Object(_commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n Object(_commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"])(this, router, player, s, commandArray.slice(1));\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n case _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialSteps */ \"d\"].ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n // Check that the script exists on this machine\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_11__[/* findRunningScript */ \"a\"])(\"n00dles.script\", [], player.getCurrentServer());\n\n if (runningScript == null) {\n this.print(\"Error: No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_9__[/* logBoxCreate */ \"a\"])(runningScript);\n Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_10__[/* iTutorialNextStep */ \"b\"])();\n } else {\n this.print(\"Bad command. Please follow the tutorial\");\n }\n\n break;\n\n default:\n this.print(\"Please follow the tutorial, or click 'Exit Tutorial' if you'd like to skip it\");\n return;\n }\n\n return;\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n\n /* Command parser */\n\n\n const commandName = commandArray[0];\n\n if (typeof commandName === \"number\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands = {\n alias: _commands_alias__WEBPACK_IMPORTED_MODULE_21__[/* alias */ \"a\"],\n analyze: _commands_analyze__WEBPACK_IMPORTED_MODULE_22__[/* analyze */ \"a\"],\n backdoor: _commands_backdoor__WEBPACK_IMPORTED_MODULE_23__[/* backdoor */ \"a\"],\n buy: _commands_buy__WEBPACK_IMPORTED_MODULE_24__[/* buy */ \"a\"],\n cat: _commands_cat__WEBPACK_IMPORTED_MODULE_25__[/* cat */ \"a\"],\n cd: _commands_cd__WEBPACK_IMPORTED_MODULE_26__[/* cd */ \"a\"],\n check: _commands_check__WEBPACK_IMPORTED_MODULE_27__[/* check */ \"a\"],\n cls: () => this.clear(),\n clear: () => this.clear(),\n connect: _commands_connect__WEBPACK_IMPORTED_MODULE_28__[/* connect */ \"a\"],\n download: _commands_download__WEBPACK_IMPORTED_MODULE_29__[/* download */ \"a\"],\n expr: _commands_expr__WEBPACK_IMPORTED_MODULE_30__[/* expr */ \"a\"],\n free: _commands_free__WEBPACK_IMPORTED_MODULE_31__[/* free */ \"a\"],\n hack: _commands_hack__WEBPACK_IMPORTED_MODULE_32__[/* hack */ \"a\"],\n help: _commands_help__WEBPACK_IMPORTED_MODULE_33__[/* help */ \"a\"],\n home: _commands_home__WEBPACK_IMPORTED_MODULE_34__[/* home */ \"a\"],\n hostname: _commands_hostname__WEBPACK_IMPORTED_MODULE_35__[/* hostname */ \"a\"],\n ifconfig: _commands_ifconfig__WEBPACK_IMPORTED_MODULE_36__[/* ifconfig */ \"a\"],\n kill: _commands_kill__WEBPACK_IMPORTED_MODULE_37__[/* kill */ \"a\"],\n killall: _commands_killall__WEBPACK_IMPORTED_MODULE_38__[/* killall */ \"a\"],\n ls: _commands_ls__WEBPACK_IMPORTED_MODULE_39__[/* ls */ \"a\"],\n lscpu: _commands_lscpu__WEBPACK_IMPORTED_MODULE_40__[/* lscpu */ \"a\"],\n mem: _commands_mem__WEBPACK_IMPORTED_MODULE_41__[/* mem */ \"a\"],\n mv: _commands_mv__WEBPACK_IMPORTED_MODULE_42__[/* mv */ \"a\"],\n nano: _commands_nano__WEBPACK_IMPORTED_MODULE_43__[/* nano */ \"a\"],\n ps: _commands_ps__WEBPACK_IMPORTED_MODULE_44__[/* ps */ \"a\"],\n rm: _commands_rm__WEBPACK_IMPORTED_MODULE_45__[/* rm */ \"a\"],\n run: _commands_run__WEBPACK_IMPORTED_MODULE_46__[/* run */ \"a\"],\n scan: _commands_scan__WEBPACK_IMPORTED_MODULE_47__[/* scan */ \"a\"],\n \"scan-analyze\": _commands_scananalyze__WEBPACK_IMPORTED_MODULE_48__[/* scananalyze */ \"a\"],\n scp: _commands_scp__WEBPACK_IMPORTED_MODULE_49__[/* scp */ \"a\"],\n sudov: _commands_sudov__WEBPACK_IMPORTED_MODULE_50__[/* sudov */ \"a\"],\n tail: _commands_tail__WEBPACK_IMPORTED_MODULE_51__[/* tail */ \"a\"],\n theme: _commands_theme__WEBPACK_IMPORTED_MODULE_52__[/* theme */ \"a\"],\n top: _commands_top__WEBPACK_IMPORTED_MODULE_53__[/* top */ \"a\"],\n unalias: _commands_unalias__WEBPACK_IMPORTED_MODULE_54__[/* unalias */ \"a\"],\n wget: _commands_wget__WEBPACK_IMPORTED_MODULE_55__[/* wget */ \"a\"]\n };\n const f = commands[commandName.toLowerCase()];\n\n if (!f) {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n f(this, router, player, s, commandArray.slice(1));\n }\n\n getProgressText() {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_17__[/* createProgressBarText */ \"a\"])({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Terminal/Terminal.ts?"); /***/ }), /* 662 */ @@ -3919,7 +3919,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buy; });\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DarkWeb/DarkWeb */ 389);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n\n\nfunction buy(terminal, router, player, server, args) {\n if (!_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n terminal.error(\"You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)\");\n return;\n }\n\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy [item name]\");\n return;\n }\n\n const arg = args[0] + \"\";\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* listAllDarkwebItems */ \"c\"])();\n } else {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* buyDarkwebItem */ \"a\"])(arg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/buy.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return buy; });\n/* harmony import */ var _DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../DarkWeb/DarkWeb */ 390);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n\n\nfunction buy(terminal, router, player, server, args) {\n if (!_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_1__[/* SpecialServerIps */ \"a\"].hasOwnProperty(\"Darkweb Server\")) {\n terminal.error(\"You need to be able to connect to the Dark Web to use the buy command. (Maybe there's a TOR router you can buy somewhere)\");\n return;\n }\n\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy [item name]\");\n return;\n }\n\n const arg = args[0] + \"\";\n\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* listAllDarkwebItems */ \"c\"])();\n } else {\n Object(_DarkWeb_DarkWeb__WEBPACK_IMPORTED_MODULE_0__[/* buyDarkwebItem */ \"a\"])(arg);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/buy.ts?"); /***/ }), /* 666 */ @@ -3931,7 +3931,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cat; });\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Message/MessageHelpers */ 131);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Message/Message */ 97);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Literature/LiteratureHelpers */ 430);\n\n\n\nfunction cat(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of cat command. Usage: cat [file]\");\n return;\n }\n\n const filename = terminal.getFilepath(args[0] + \"\");\n\n if (!filename.endsWith(\".msg\") && !filename.endsWith(\".lit\") && !filename.endsWith(\".txt\")) {\n terminal.error(\"Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)\");\n return;\n }\n\n if (filename.endsWith(\".msg\") || filename.endsWith(\".lit\")) {\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.endsWith(\".lit\") && server.messages[i] === filename) {\n const file = server.messages[i];\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_1__[/* Message */ \"a\"]) throw new Error(\".lit file should not be a .msg\");\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__[/* showLiterature */ \"a\"])(file);\n return;\n } else if (filename.endsWith(\".msg\")) {\n const file = server.messages[i];\n if (file.filename !== filename) continue;\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__[/* showMessage */ \"e\"])(file);\n return;\n }\n }\n } else if (filename.endsWith(\".txt\")) {\n const txt = terminal.getTextFile(player, filename);\n\n if (txt != null) {\n txt.show();\n return;\n }\n }\n\n terminal.error(`No such file ${filename}`);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/cat.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cat; });\n/* harmony import */ var _Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Message/MessageHelpers */ 132);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Message/Message */ 97);\n/* harmony import */ var _Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Literature/LiteratureHelpers */ 431);\n\n\n\nfunction cat(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of cat command. Usage: cat [file]\");\n return;\n }\n\n const filename = terminal.getFilepath(args[0] + \"\");\n\n if (!filename.endsWith(\".msg\") && !filename.endsWith(\".lit\") && !filename.endsWith(\".txt\")) {\n terminal.error(\"Only .msg, .txt, and .lit files are viewable with cat (filename must end with .msg, .txt, or .lit)\");\n return;\n }\n\n if (filename.endsWith(\".msg\") || filename.endsWith(\".lit\")) {\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.endsWith(\".lit\") && server.messages[i] === filename) {\n const file = server.messages[i];\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_1__[/* Message */ \"a\"]) throw new Error(\".lit file should not be a .msg\");\n Object(_Literature_LiteratureHelpers__WEBPACK_IMPORTED_MODULE_2__[/* showLiterature */ \"a\"])(file);\n return;\n } else if (filename.endsWith(\".msg\")) {\n const file = server.messages[i];\n if (file.filename !== filename) continue;\n Object(_Message_MessageHelpers__WEBPACK_IMPORTED_MODULE_0__[/* showMessage */ \"e\"])(file);\n return;\n }\n }\n } else if (filename.endsWith(\".txt\")) {\n const txt = terminal.getTextFile(player, filename);\n\n if (txt != null) {\n txt.show();\n return;\n }\n }\n\n terminal.error(`No such file ${filename}`);\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/cat.ts?"); /***/ }), /* 667 */ @@ -4017,7 +4017,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return help; });\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../HelpText */ 390);\n\nfunction help(terminal, router, player, server, args) {\n if (args.length !== 0 && args.length !== 1) {\n terminal.error(\"Incorrect usage of help command. Usage: help\");\n return;\n }\n\n if (args.length === 0) {\n _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* TerminalHelpText */ \"b\"].forEach(line => terminal.print(line));\n } else {\n const cmd = args[0];\n const txt = _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* HelpTexts */ \"a\"][cmd];\n\n if (txt == null) {\n terminal.error(\"No help topics match '\" + cmd + \"'\");\n return;\n }\n\n txt.forEach(t => terminal.print(t));\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/help.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return help; });\n/* harmony import */ var _HelpText__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../HelpText */ 391);\n\nfunction help(terminal, router, player, server, args) {\n if (args.length !== 0 && args.length !== 1) {\n terminal.error(\"Incorrect usage of help command. Usage: help\");\n return;\n }\n\n if (args.length === 0) {\n _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* TerminalHelpText */ \"b\"].forEach(line => terminal.print(line));\n } else {\n const cmd = args[0];\n const txt = _HelpText__WEBPACK_IMPORTED_MODULE_0__[/* HelpTexts */ \"a\"][cmd];\n\n if (txt == null) {\n terminal.error(\"No help topics match '\" + cmd + \"'\");\n return;\n }\n\n txt.forEach(t => terminal.print(t));\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/help.ts?"); /***/ }), /* 676 */ @@ -4065,7 +4065,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return kill; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 102);\n\nfunction kill(terminal, router, player, server, args) {\n try {\n if (args.length < 1) {\n terminal.error(\"Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...\");\n return;\n } // Kill by PID\n\n\n if (typeof args[0] === \"number\") {\n const pid = args[0];\n const res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(pid);\n\n if (res) {\n terminal.print(`Killing script with PID ${pid}`);\n } else {\n terminal.print(`Failed to kill script with PID ${pid}. No such script exists`);\n }\n\n return;\n }\n\n const scriptName = terminal.getFilepath(args[0]);\n const runningScript = server.getRunningScript(scriptName, args.slice(1));\n\n if (runningScript == null) {\n terminal.error(\"No such script is running. Nothing to kill\");\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(runningScript, server.ip, false);\n terminal.print(`Killing ${scriptName}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/kill.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return kill; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n\nfunction kill(terminal, router, player, server, args) {\n try {\n if (args.length < 1) {\n terminal.error(\"Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...\");\n return;\n } // Kill by PID\n\n\n if (typeof args[0] === \"number\") {\n const pid = args[0];\n const res = Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(pid);\n\n if (res) {\n terminal.print(`Killing script with PID ${pid}`);\n } else {\n terminal.print(`Failed to kill script with PID ${pid}. No such script exists`);\n }\n\n return;\n }\n\n const scriptName = terminal.getFilepath(args[0]);\n const runningScript = server.getRunningScript(scriptName, args.slice(1));\n\n if (runningScript == null) {\n terminal.error(\"No such script is running. Nothing to kill\");\n return;\n }\n\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(runningScript, server.ip, false);\n terminal.print(`Killing ${scriptName}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/kill.ts?"); /***/ }), /* 680 */ @@ -4077,7 +4077,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killall; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 102);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 212);\n\n\nfunction killall(terminal, router, player, server) {\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n terminal.print(\"Killing all running scripts\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/killall.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return killall; });\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 213);\n\n\nfunction killall(terminal, router, player, server) {\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n Object(_Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_0__[/* killWorkerScript */ \"a\"])(server.runningScripts[i], server.ip, false);\n }\n\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptStartStopEventEmitter */ \"a\"].emitEvent();\n terminal.print(\"Killing all running scripts\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/killall.ts?"); /***/ }), /* 681 */ @@ -4113,7 +4113,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return mv; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../TextFile */ 196);\n\n\nfunction mv(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(`Incorrect number of arguments. Usage: mv [src] [dest]`);\n return;\n }\n\n try {\n const source = args[0] + \"\";\n const dest = args[1] + \"\";\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source) && !source.endsWith(\".txt\")) {\n terminal.error(`'mv' can only be used on scripts and text files (.txt)`);\n return;\n }\n\n const srcFile = terminal.getFile(player, source);\n\n if (srcFile == null) {\n terminal.error(`Source file ${source} does not exist`);\n return;\n }\n\n const sourcePath = terminal.getFilepath(source);\n const destPath = terminal.getFilepath(dest);\n const destFile = terminal.getFile(player, dest); // 'mv' command only works on scripts and txt files.\n // Also, you can't convert between different file types\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source)) {\n const script = srcFile;\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(dest)) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n } // Command doesnt work if script is running\n\n\n if (server.isRunning(sourcePath)) {\n terminal.error(`Cannot use 'mv' on a script that is running`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n script.filename = destPath;\n } else if (srcFile instanceof _TextFile__WEBPACK_IMPORTED_MODULE_1__[/* TextFile */ \"a\"]) {\n const textFile = srcFile;\n\n if (!dest.endsWith(\".txt\")) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n textFile.fn = destPath;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/mv.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return mv; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../TextFile */ 197);\n\n\nfunction mv(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(`Incorrect number of arguments. Usage: mv [src] [dest]`);\n return;\n }\n\n try {\n const source = args[0] + \"\";\n const dest = args[1] + \"\";\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source) && !source.endsWith(\".txt\")) {\n terminal.error(`'mv' can only be used on scripts and text files (.txt)`);\n return;\n }\n\n const srcFile = terminal.getFile(player, source);\n\n if (srcFile == null) {\n terminal.error(`Source file ${source} does not exist`);\n return;\n }\n\n const sourcePath = terminal.getFilepath(source);\n const destPath = terminal.getFilepath(dest);\n const destFile = terminal.getFile(player, dest); // 'mv' command only works on scripts and txt files.\n // Also, you can't convert between different file types\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(source)) {\n const script = srcFile;\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(dest)) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n } // Command doesnt work if script is running\n\n\n if (server.isRunning(sourcePath)) {\n terminal.error(`Cannot use 'mv' on a script that is running`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n script.filename = destPath;\n } else if (srcFile instanceof _TextFile__WEBPACK_IMPORTED_MODULE_1__[/* TextFile */ \"a\"]) {\n const textFile = srcFile;\n\n if (!dest.endsWith(\".txt\")) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n }\n\n if (destFile != null) {\n // Already exists, will be overwritten, so we'll delete it\n const status = server.removeFile(destPath);\n\n if (!status.res) {\n terminal.error(`Something went wrong...please contact game dev (probably a bug)`);\n return;\n } else {\n terminal.print(\"Warning: The destination file was overwritten\");\n }\n }\n\n textFile.fn = destPath;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/mv.ts?"); /***/ }), /* 684 */ @@ -4125,7 +4125,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return nano; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Fconf/Fconf */ 311);\n\n\nfunction nano(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of nano command. Usage: nano [scriptname]\");\n return;\n }\n\n try {\n const filename = args[0] + \"\";\n\n if (filename === \".fconf\") {\n const text = Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__[/* createFconf */ \"a\"])();\n router.toScriptEditor(filename, text);\n return;\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n\n if (script == null) {\n let code = \"\";\n\n if (filename.endsWith(\".ns\") || filename.endsWith(\".js\")) {\n code = `export async function main(ns) {\n\n}`;\n }\n\n router.toScriptEditor(filepath, code);\n } else {\n router.toScriptEditor(filepath, script.code);\n }\n } else if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n\n if (txt == null) {\n router.toScriptEditor(filepath);\n } else {\n router.toScriptEditor(filepath, txt.text);\n }\n } else {\n terminal.error(\"Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano\");\n return;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/nano.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return nano; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Fconf/Fconf */ 313);\n\n\nfunction nano(terminal, router, player, server, args) {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of nano command. Usage: nano [scriptname]\");\n return;\n }\n\n try {\n const filename = args[0] + \"\";\n\n if (filename === \".fconf\") {\n const text = Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_1__[/* createFconf */ \"a\"])();\n router.toScriptEditor(filename, text);\n return;\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n\n if (script == null) {\n let code = \"\";\n\n if (filename.endsWith(\".ns\") || filename.endsWith(\".js\")) {\n code = `export async function main(ns) {\n\n}`;\n }\n\n router.toScriptEditor(filepath, code);\n } else {\n router.toScriptEditor(filepath, script.code);\n }\n } else if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n\n if (txt == null) {\n router.toScriptEditor(filepath);\n } else {\n router.toScriptEditor(filepath, txt.text);\n }\n } else {\n terminal.error(\"Invalid file. Only scripts (.script, .ns, .js), text files (.txt), or .fconf can be edited with nano\");\n return;\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/nano.ts?"); /***/ }), /* 685 */ @@ -4161,7 +4161,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runScript; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../NetscriptWorker */ 124);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/RunningScript */ 276);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! arg */ 436);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction runScript(terminal, router, player, server, commandArgs) {\n if (commandArgs.length < 1) {\n terminal.error(`Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`);\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n const runArgs = {\n \"--tail\": Boolean,\n \"-t\": Number\n };\n const flags = arg__WEBPACK_IMPORTED_MODULE_4__(runArgs, {\n permissive: true,\n argv: commandArgs.slice(1)\n });\n const threadFlag = Math.round(parseFloat(flags[\"-t\"]));\n const tailFlag = flags[\"--tail\"] === true;\n\n if (flags[\"-t\"] !== undefined && (threadFlag < 0 || isNaN(threadFlag))) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 0\");\n return;\n }\n\n const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"]; // Check if this script is already running\n\n if (Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__[/* findRunningScript */ \"a\"])(scriptName, args, server) != null) {\n terminal.print(\"ERROR: This script is already running. Cannot run multiple instances\");\n return;\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (server.scripts[i].filename !== scriptName) {\n continue;\n } // Check for admin rights and that there is enough RAM availble to run\n\n\n const script = server.scripts[i];\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.print(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.print(\"This machine does not have enough RAM to run this script with \" + numThreads + \" threads. Script requires \" + ramUsage + \"GB of RAM\");\n return;\n } // Able to run script\n\n\n const runningScript = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__[/* RunningScript */ \"a\"](script, args);\n runningScript.threads = numThreads;\n const success = Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__[/* startWorkerScript */ \"e\"])(runningScript, server);\n\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`);\n\n if (tailFlag) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n\n return;\n }\n\n terminal.print(\"ERROR: No such script\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runScript.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return runScript; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../NetscriptWorker */ 125);\n/* harmony import */ var _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Script/RunningScript */ 277);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! arg */ 437);\n/* harmony import */ var arg__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(arg__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction runScript(terminal, router, player, server, commandArgs) {\n if (commandArgs.length < 1) {\n terminal.error(`Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`);\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n const runArgs = {\n \"--tail\": Boolean,\n \"-t\": Number\n };\n const flags = arg__WEBPACK_IMPORTED_MODULE_4__(runArgs, {\n permissive: true,\n argv: commandArgs.slice(1)\n });\n const threadFlag = Math.round(parseFloat(flags[\"-t\"]));\n const tailFlag = flags[\"--tail\"] === true;\n\n if (flags[\"-t\"] !== undefined && (threadFlag < 0 || isNaN(threadFlag))) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 0\");\n return;\n }\n\n const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"]; // Check if this script is already running\n\n if (Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_3__[/* findRunningScript */ \"a\"])(scriptName, args, server) != null) {\n terminal.print(\"ERROR: This script is already running. Cannot run multiple instances\");\n return;\n } // Check if the script exists and if it does run it\n\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (server.scripts[i].filename !== scriptName) {\n continue;\n } // Check for admin rights and that there is enough RAM availble to run\n\n\n const script = server.scripts[i];\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.print(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.print(\"This machine does not have enough RAM to run this script with \" + numThreads + \" threads. Script requires \" + ramUsage + \"GB of RAM\");\n return;\n } // Able to run script\n\n\n const runningScript = new _Script_RunningScript__WEBPACK_IMPORTED_MODULE_2__[/* RunningScript */ \"a\"](script, args);\n runningScript.threads = numThreads;\n const success = Object(_NetscriptWorker__WEBPACK_IMPORTED_MODULE_1__[/* startWorkerScript */ \"e\"])(runningScript, server);\n\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(`Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`);\n\n if (tailFlag) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n\n return;\n }\n\n terminal.print(\"ERROR: No such script\");\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/runScript.ts?"); /***/ }), /* 688 */ @@ -4221,7 +4221,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tail; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\n\nfunction tail(terminal, router, player, server, commandArray) {\n try {\n if (commandArray.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...\");\n } else if (typeof commandArray[0] === \"string\") {\n const scriptName = terminal.getFilepath(commandArray[0]);\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script, .ns, .js files, or by pid\");\n return;\n } // Get script arguments\n\n\n const args = [];\n\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n } // go over all the running scripts. If there's a perfect\n // match, use it!\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(server.runningScripts[i]);\n return;\n }\n } // Find all scripts that are potential candidates.\n\n\n const candidates = [];\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n // only scripts that have more arguments (equal arguments is already caught)\n if (server.runningScripts[i].args.length < args.length) continue; // make a smaller copy of the args.\n\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n } // If there's only 1 possible choice, use that.\n\n\n if (candidates.length === 1) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(candidates[0]);\n return;\n } // otherwise lists all possible conflicting choices.\n\n\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n\n terminal.error(\"Script arguments need to be specified.\");\n return;\n } // if there's no candidate then we just don't know.\n\n\n terminal.error(\"No such script exists.\");\n } else {\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findRunningScriptByPid */ \"b\"])(commandArray[0], server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/tail.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tail; });\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Script/ScriptHelpers */ 169);\n/* harmony import */ var _utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/compareArrays */ 241);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\n\n\n\nfunction tail(terminal, router, player, server, commandArray) {\n try {\n if (commandArray.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: tail [script] [arg1] [arg2]...\");\n } else if (typeof commandArray[0] === \"string\") {\n const scriptName = terminal.getFilepath(commandArray[0]);\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_3__[/* isScriptFilename */ \"a\"])(scriptName)) {\n terminal.error(\"tail can only be called on .script, .ns, .js files, or by pid\");\n return;\n } // Get script arguments\n\n\n const args = [];\n\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n } // go over all the running scripts. If there's a perfect\n // match, use it!\n\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(server.runningScripts[i].args, args)) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(server.runningScripts[i]);\n return;\n }\n } // Find all scripts that are potential candidates.\n\n\n const candidates = [];\n\n for (let i = 0; i < server.runningScripts.length; ++i) {\n // only scripts that have more arguments (equal arguments is already caught)\n if (server.runningScripts[i].args.length < args.length) continue; // make a smaller copy of the args.\n\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n\n if (server.runningScripts[i].filename === scriptName && Object(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_2__[/* compareArrays */ \"a\"])(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n } // If there's only 1 possible choice, use that.\n\n\n if (candidates.length === 1) {\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(candidates[0]);\n return;\n } // otherwise lists all possible conflicting choices.\n\n\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n\n terminal.error(\"Script arguments need to be specified.\");\n return;\n } // if there's no candidate then we just don't know.\n\n\n terminal.error(\"No such script exists.\");\n } else {\n const runningScript = Object(_Script_ScriptHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findRunningScriptByPid */ \"b\"])(commandArray[0], server);\n\n if (runningScript == null) {\n terminal.error(\"No such script exists\");\n return;\n }\n\n Object(_utils_LogBox__WEBPACK_IMPORTED_MODULE_0__[/* logBoxCreate */ \"a\"])(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/tail.ts?"); /***/ }), /* 693 */ @@ -4245,7 +4245,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return top; });\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/RunningScriptHelpers */ 437);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction top(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of top command. Usage: top\");\n return;\n } // Headers\n\n\n const scriptWidth = 40;\n const pidWidth = 10;\n const threadsWidth = 16;\n const scriptTxt = \"Script\";\n const pidTxt = \"PID\";\n const threadsTxt = \"Threads\";\n const ramTxt = \"RAM Usage\";\n const spacesAfterScriptTxt = \" \".repeat(scriptWidth - scriptTxt.length);\n const spacesAfterPidTxt = \" \".repeat(pidWidth - pidTxt.length);\n const spacesAfterThreadsTxt = \" \".repeat(threadsWidth - threadsTxt.length);\n const headers = `${scriptTxt}${spacesAfterScriptTxt}${pidTxt}${spacesAfterPidTxt}${threadsTxt}${spacesAfterThreadsTxt}${ramTxt}`;\n terminal.print(headers);\n const currRunningScripts = server.runningScripts; // Iterate through scripts on current server\n\n for (let i = 0; i < currRunningScripts.length; i++) {\n const script = currRunningScripts[i]; // Calculate name padding\n\n const numSpacesScript = Math.max(0, scriptWidth - script.filename.length);\n const spacesScript = \" \".repeat(numSpacesScript); // Calculate PID padding\n\n const numSpacesPid = Math.max(0, pidWidth - (script.pid + \"\").length);\n const spacesPid = \" \".repeat(numSpacesPid); // Calculate thread padding\n\n const numSpacesThread = Math.max(0, threadsWidth - (script.threads + \"\").length);\n const spacesThread = \" \".repeat(numSpacesThread); // Calculate and transform RAM usage\n\n const ramUsage = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getRamUsageFromRunningScript */ \"a\"])(script) * script.threads);\n const entry = [script.filename, spacesScript, script.pid, spacesPid, script.threads, spacesThread, ramUsage].join(\"\");\n terminal.print(entry);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/top.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return top; });\n/* harmony import */ var _Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/RunningScriptHelpers */ 438);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n\n\nfunction top(terminal, router, player, server, args) {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of top command. Usage: top\");\n return;\n } // Headers\n\n\n const scriptWidth = 40;\n const pidWidth = 10;\n const threadsWidth = 16;\n const scriptTxt = \"Script\";\n const pidTxt = \"PID\";\n const threadsTxt = \"Threads\";\n const ramTxt = \"RAM Usage\";\n const spacesAfterScriptTxt = \" \".repeat(scriptWidth - scriptTxt.length);\n const spacesAfterPidTxt = \" \".repeat(pidWidth - pidTxt.length);\n const spacesAfterThreadsTxt = \" \".repeat(threadsWidth - threadsTxt.length);\n const headers = `${scriptTxt}${spacesAfterScriptTxt}${pidTxt}${spacesAfterPidTxt}${threadsTxt}${spacesAfterThreadsTxt}${ramTxt}`;\n terminal.print(headers);\n const currRunningScripts = server.runningScripts; // Iterate through scripts on current server\n\n for (let i = 0; i < currRunningScripts.length; i++) {\n const script = currRunningScripts[i]; // Calculate name padding\n\n const numSpacesScript = Math.max(0, scriptWidth - script.filename.length);\n const spacesScript = \" \".repeat(numSpacesScript); // Calculate PID padding\n\n const numSpacesPid = Math.max(0, pidWidth - (script.pid + \"\").length);\n const spacesPid = \" \".repeat(numSpacesPid); // Calculate thread padding\n\n const numSpacesThread = Math.max(0, threadsWidth - (script.threads + \"\").length);\n const spacesThread = \" \".repeat(numSpacesThread); // Calculate and transform RAM usage\n\n const ramUsage = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRAM(Object(_Script_RunningScriptHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getRamUsageFromRunningScript */ \"a\"])(script) * script.threads);\n const entry = [script.filename, spacesScript, script.pid, spacesPid, script.threads, spacesThread, ramUsage].join(\"\");\n terminal.print(entry);\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/commands/top.ts?"); /***/ }), /* 695 */ @@ -4269,7 +4269,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return wget; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\nfunction wget(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of wget command. Usage: wget [url] [target file]\");\n return;\n }\n\n const url = args[0] + \"\";\n const target = terminal.getFilepath(args[1] + \"\");\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n return terminal.print(`wget failed: Invalid target file. Target file must be script or text file`);\n }\n\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target)) {\n res = server.writeToScriptFile(target, data);\n } else {\n res = server.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n return terminal.print(\"wget failed\");\n }\n\n if (res.overwritten) {\n return terminal.print(`wget successfully retrieved content and overwrote ${target}`);\n }\n\n return terminal.print(`wget successfully retrieved content to new file ${target}`);\n }, \"text\").fail(function (e) {\n return terminal.error(\"wget failed: \" + JSON.stringify(e));\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 377)))\n\n//# sourceURL=webpack:///./src/Terminal/commands/wget.ts?"); +eval("/* WEBPACK VAR INJECTION */(function($) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return wget; });\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n\nfunction wget(terminal, router, player, server, args) {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of wget command. Usage: wget [url] [target file]\");\n return;\n }\n\n const url = args[0] + \"\";\n const target = terminal.getFilepath(args[1] + \"\");\n\n if (!Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target) && !target.endsWith(\".txt\")) {\n return terminal.print(`wget failed: Invalid target file. Target file must be script or text file`);\n }\n\n $.get(url, function (data) {\n let res;\n\n if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_0__[/* isScriptFilename */ \"a\"])(target)) {\n res = server.writeToScriptFile(target, data);\n } else {\n res = server.writeToTextFile(target, data);\n }\n\n if (!res.success) {\n return terminal.print(\"wget failed\");\n }\n\n if (res.overwritten) {\n return terminal.print(`wget successfully retrieved content and overwrote ${target}`);\n }\n\n return terminal.print(`wget successfully retrieved content to new file ${target}`);\n }, \"text\").fail(function (e) {\n return terminal.error(\"wget failed: \" + JSON.stringify(e));\n });\n}\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! jquery */ 378)))\n\n//# sourceURL=webpack:///./src/Terminal/commands/wget.ts?"); /***/ }), /* 697 */ @@ -4293,7 +4293,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industry; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Material */ 130);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/calculateEffectWithFactors */ 699);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OfficeSpace */ 289);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Product */ 312);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndustryUpgrades */ 290);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Industry {\n //An array of the name of materials being produced\n //Should always be less than awareness\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n //Real estate Factor\n //Scientific Research Factor, affects quality\n //Hardware factor\n //Robotics Factor\n //AI Cores factor;\n //Advertising factor, affects sales\n //Upgrades\n //Maps locations to offices. 0 if no office at that location\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture);\n\n _defineProperty(this, \"sciResearch\", new _Material__WEBPACK_IMPORTED_MODULE_6__[/* Material */ \"a\"]({\n name: \"Scientific Research\"\n }));\n\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prodMats\", []);\n\n _defineProperty(this, \"products\", {});\n\n _defineProperty(this, \"makesProducts\", false);\n\n _defineProperty(this, \"awareness\", 0);\n\n _defineProperty(this, \"popularity\", 0);\n\n _defineProperty(this, \"startingCost\", 0);\n\n _defineProperty(this, \"reFac\", 0);\n\n _defineProperty(this, \"sciFac\", 0);\n\n _defineProperty(this, \"hwFac\", 0);\n\n _defineProperty(this, \"robFac\", 0);\n\n _defineProperty(this, \"aiFac\", 0);\n\n _defineProperty(this, \"advFac\", 0);\n\n _defineProperty(this, \"prodMult\", 0);\n\n _defineProperty(this, \"upgrades\", Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__[/* IndustryUpgrades */ \"a\"]).length).fill(0));\n\n _defineProperty(this, \"state\", \"START\");\n\n _defineProperty(this, \"newInd\", true);\n\n _defineProperty(this, \"offices\", {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]({\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n });\n\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture; //Financials\n\n this.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.warehouses = {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]({\n corp: params.corp,\n industry: this,\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n };\n this.init();\n }\n\n init() {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryStartingCosts */ \"d\"][this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2\n };\n this.prodMats = [\"Energy\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1\n };\n this.prodMats = [\"Water\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5\n };\n this.prodMats = [\"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8\n };\n this.prodMats = [\"Metal\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5\n };\n this.prodMats = [\"Chemicals\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText() {\n if (!this.makesProducts) return \"\";\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n return \"create and manage restaurants\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n return \"create tobacco and tobacco-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n return \"build specialized robots and robot-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n return \"develop computer software\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n return \"build and manage hospitals\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n return \"develop and manage real estate properties\";\n\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts() {\n if (!this.makesProducts) return 0; // Calculate additional number of allowed Products from Research/Upgrades\n\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n return _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts() {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n } //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n\n\n calculateProductionFactors() {\n let multSum = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const warehouse = this.warehouses[city];\n\n if (!(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const materials = warehouse.materials;\n const cityMult = Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) * Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) * Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) * Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? this.prodMult = 1 : this.prodMult = multSum;\n }\n\n updateWarehouseSizeUsed(warehouse) {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n\n if (prod.data[warehouse.loc][0] > 0) {\n warehouse.breakdown += prodName + \": \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__[/* formatNumber */ \"c\"])(prod.data[warehouse.loc][0] * prod.siz, 0) + \"
\";\n }\n }\n }\n }\n\n process(marketCycles = 1, state, corporation) {\n this.state = state; //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\");\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n }\n\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0); // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n\n if (this.lastCycleRevenue.gt(0)) {\n this.newInd = false;\n } // Process offices (and the employees in them)\n\n\n let employeeSalary = 0;\n\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n\n this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); // Process change in demand/competition of materials/products\n\n this.processMaterialMarket();\n this.processProductMarket(marketCycles); // Process loss of popularity\n\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity); // Process Dreamsense gains\n\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n } // Process production, purchase, and import/export of materials\n\n\n let res = this.processMaterials(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n } // Process creation, production & sale of products\n\n\n res = this.processProducts(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n }\n } // Process change in demand and competition for this industry's materials\n\n\n processMaterialMarket() {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats; //Only 'process the market' for materials that this industry deals with\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const wh = this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]];\n if (wh === 0) continue;\n\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n } //Produced materials are stored in an array\n\n\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n } //Process these twice because these boost production\n\n\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n } // Process change in demand and competition for this industry's products\n\n\n processProductMarket(marketCycles = 1) {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics) {\n change *= 3;\n }\n\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n } //Process production, purchase, and import/export of materials\n\n\n processMaterials(marketCycles = 1, corporation) {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors(); //At the start of the export state, set the imports of everything to 0\n\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n\n if (!(this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\":\n {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n\n buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n }\n\n buyAmt = Math.min(buyAmt, maxAmt);\n\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n // smart supply\n\n\n const smartBuy = {};\n\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName]; //Smart supply tracker is stored as per second rate\n\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n } // Find which material were trying to create the least amount of product with.\n\n\n let worseAmt = 1e99;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n } // Align all the materials to the smallest amount.\n\n\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n } // Calculate the total size of all things were trying to buy\n\n\n let totalSize = 0;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName];\n } // Shrink to the size of available space.\n\n\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor(buyAmt * freeSpace / totalSize);\n }\n } // Use the materials already in the warehouse if the option is on.\n\n\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n } // buy them\n\n\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n break;\n }\n\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]]; //Calculate the maximum production of this material based\n //on the office's productivity\n\n const maxProd = this.getOfficeProductivity(office) * this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() * this.getProductionMultiplier(); // Multiplier from Research\n\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n // Calculate net change in warehouse storage making the produced materials will cost\n\n let totalMatSize = 0;\n\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][this.prodMats[tmp]];\n }\n\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n } // If not enough space in warehouse, limit the amount of produced materials\n\n\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n } // Keep track of production for smart supply (/s)\n\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); // Make sure we have enough resource to make our materials\n\n let producableFrac = 1;\n\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n } // Make our materials if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer] / 90 + Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n } //Per second\n\n\n const fooProd = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n } // Sale multipliers\n\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n // Determine the cost that the material will be sold at\n\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n\n if (mat.marketTa2) {\n const prod = mat.prd; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = (mat.qlt + 0.001) * marketFactor * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n } // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n\n\n mat.marketTa2Price = optimalPrice;\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sCost)) {\n sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n } // Calculate how much of the material sells (per second)\n\n\n let markup = 1;\n\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell = (mat.qlt + 0.001) * marketFactor * markup * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = mat.sllman[1].replace(/MAX/g, maxSell + \"\");\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell amount for material \" + mat.name + \" in \" + this.name + \"'s \" + city + \" office. The sell amount \" + \"is being set to zero\");\n sellAmt = 0;\n }\n\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1]);\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n\n\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(/MAX/g, mat.qty / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles) + \"\");\n let amt = 0;\n\n try {\n amt = eval(amtStr);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Calculating export for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division failed with \" + \"error: \" + e);\n continue;\n }\n\n if (isNaN(amt)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error calculating export amount for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division.\");\n continue;\n }\n\n amt = amt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n\n if (amt === 0) {\n break; //None left\n }\n\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n\n if (!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n } // Make sure theres enough space in warehouse\n\n\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n amt = Math.min(maxAmt, amt);\n }\n\n expWarehouse.materials[matName].imp += amt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n } //totalExp should be per second\n\n\n mat.totalExp /= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n\n\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n this.sciResearch.qty += 0.004 * Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].RandD], 0.5) * corporation.getScientificResearchMultiplier() * this.getScientificResearchMultiplier();\n }\n }\n\n return [revenue, expenses];\n } //Process production & sale of this industry's FINISHED products (including all of their stats)\n\n\n processProducts(marketCycles = 1, corporation) {\n let revenue = 0;\n const expenses = 0; //Create products\n\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue; // Designing/Creating a Product is based mostly off Engineers\n\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const total = engrProd + mgmtProd + opProd;\n\n if (total <= 0) {\n break;\n } // Management is a multiplier for the production from Engineers\n\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n prod.createProduct(marketCycles, progress);\n\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n\n break;\n }\n }\n } //Produce Products\n\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n\n if (prod instanceof _Product__WEBPACK_IMPORTED_MODULE_10__[/* Product */ \"a\"] && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n\n return [revenue, expenses];\n } //Processes FINISHED products\n\n\n processProduct(marketCycles = 1, product, corporation) {\n let totalProfit = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n\n if (warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n switch (this.state) {\n case \"PRODUCTION\":\n {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd = this.getOfficeProductivity(office, {\n forProduct: true\n }) * corporation.getProductionMultiplier() * this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n\n let prod; //Account for whether production is manually limited\n\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Calculate net change in warehouse storage making the Products will cost\n\n let netStorageSize = product.siz;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n }\n } //If there's not enough space in warehouse, limit the amount of Product\n\n\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //Make sure we have enough resources to make our Products\n\n let producableFrac = 1;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n } //Make our Products if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n } //Quantity\n\n\n product.data[city][0] += prod * producableFrac;\n } //Keep track of production Per second\n\n\n product.data[city][1] = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n break;\n }\n\n case \"SALE\":\n {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n } // Since its a product, its production cost is increased for labor\n\n\n product.pCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio; // Sale multipliers\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n\n const markupLimit = product.rat / product.mku;\n let sCost;\n\n if (product.marketTa2) {\n const prod = product.data[city][1]; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * businessFactor * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n } // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n\n\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sCost)) {\n const sCostString = product.sCost;\n\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * Math.pow(markup, 2) * businessFactor * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (product.sllman[city][0] && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, maxSell);\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n\n try {\n tmp = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell price expression for \" + product.name + \" in \" + this.name + \"'s \" + city + \" office. Sell price is being set to MAX\");\n tmp = maxSell;\n }\n\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n\n break;\n }\n\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n\n }\n }\n\n return totalProfit;\n }\n\n discontinueProduct(product) {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade, refs) {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0:\n {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n\n break;\n }\n\n case 1:\n {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(1, 3) / 100) * advMult;\n break;\n }\n\n default:\n {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n } // Returns how much of a material can be produced based of office productivity (employee stats)\n\n\n getOfficeProductivity(office, params = {}) {\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) return 0; // Management is a multiplier for the production from Operations and Engineers\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total); // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor; // Generic multiplier for the production. Used for game-balancing purposes\n\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n } // Returns a multiplier based on the office' 'Business' employees that affects sales\n\n\n getBusinessFactor(office) {\n const businessProd = 1 + office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Business];\n return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__[/* calculateEffectWithFactors */ \"a\"])(businessProd, 0.26, 10e3);\n } //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n\n\n getAdvertisingFactors() {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n } //Returns a multiplier based on a materials demand and competition that affects sales\n\n\n getMarketFactor(mat) {\n return Math.max(0.1, mat.dmd * (100 - mat.cmp) / 100);\n } // Returns a boolean indicating whether this Industry has the specified Research\n\n\n hasResearch(name) {\n return this.researched[name] === true;\n }\n\n updateResearchTree() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`); // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n } // Get multipliers from Research\n\n\n getAdvertisingMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n copy() {\n // products: { [key: string]: Product | undefined } = {};\n // //Maps locations to warehouses. 0 if no warehouse at that location\n // warehouses: { [key: string]: Warehouse | 0 };\n // //Maps locations to offices. 0 if no office at that location\n // offices: { [key: string]: OfficeSpace | 0 } = {\n // [CityName.Aevum]: 0,\n // [CityName.Chongqing]: 0,\n // [CityName.Sector12]: new OfficeSpace({\n // loc: CityName.Sector12,\n // size: CorporationConstants.OfficeInitialSize,\n // }),\n // [CityName.NewTokyo]: 0,\n // [CityName.Ishima]: 0,\n // [CityName.Volhaven]: 0,\n // };\n const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n\n division.reqMats = {};\n\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Industry\", this);\n }\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Industry, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Industry = Industry;\n\n//# sourceURL=webpack:///./src/Corporation/Industry.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Industry; });\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Locations/data/CityNames */ 21);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./IndustryData */ 40);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./data/Constants */ 35);\n/* harmony import */ var _EmployeePositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EmployeePositions */ 37);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Material */ 131);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/calculateEffectWithFactors */ 699);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./OfficeSpace */ 290);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./Product */ 314);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/helpers/isString */ 82);\n/* harmony import */ var _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./MaterialSizes */ 140);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./Warehouse */ 175);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./IndustryUpgrades */ 291);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nclass Industry {\n //An array of the name of materials being produced\n //Should always be less than awareness\n\n /* The following are factors for how much production/other things are increased by\n different factors. The production increase always has diminishing returns,\n and they are all reprsented by exponentials of < 1 (e.g x ^ 0.5, x ^ 0.8)\n The number for these represent the exponential. A lower number means more\n diminishing returns */\n //Real estate Factor\n //Scientific Research Factor, affects quality\n //Hardware factor\n //Robotics Factor\n //AI Cores factor;\n //Advertising factor, affects sales\n //Upgrades\n //Maps locations to offices. 0 if no office at that location\n constructor(params = {}) {\n _defineProperty(this, \"name\", \"\");\n\n _defineProperty(this, \"type\", _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture);\n\n _defineProperty(this, \"sciResearch\", new _Material__WEBPACK_IMPORTED_MODULE_6__[/* Material */ \"a\"]({\n name: \"Scientific Research\"\n }));\n\n _defineProperty(this, \"researched\", {});\n\n _defineProperty(this, \"reqMats\", {});\n\n _defineProperty(this, \"prodMats\", []);\n\n _defineProperty(this, \"products\", {});\n\n _defineProperty(this, \"makesProducts\", false);\n\n _defineProperty(this, \"awareness\", 0);\n\n _defineProperty(this, \"popularity\", 0);\n\n _defineProperty(this, \"startingCost\", 0);\n\n _defineProperty(this, \"reFac\", 0);\n\n _defineProperty(this, \"sciFac\", 0);\n\n _defineProperty(this, \"hwFac\", 0);\n\n _defineProperty(this, \"robFac\", 0);\n\n _defineProperty(this, \"aiFac\", 0);\n\n _defineProperty(this, \"advFac\", 0);\n\n _defineProperty(this, \"prodMult\", 0);\n\n _defineProperty(this, \"upgrades\", Array(Object.keys(_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_15__[/* IndustryUpgrades */ \"a\"]).length).fill(0));\n\n _defineProperty(this, \"state\", \"START\");\n\n _defineProperty(this, \"newInd\", true);\n\n _defineProperty(this, \"offices\", {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]({\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].OfficeInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n });\n\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture; //Financials\n\n this.lastCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.lastCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.warehouses = {\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Aevum]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Chongqing]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12]: new _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]({\n corp: params.corp,\n industry: this,\n loc: _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Sector12,\n size: _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].WarehouseInitialSize\n }),\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].NewTokyo]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Ishima]: 0,\n [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_1__[/* CityName */ \"a\"].Volhaven]: 0\n };\n this.init();\n }\n\n init() {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryStartingCosts */ \"d\"][this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Energy:\n this.reFac = 0.65;\n this.sciFac = 0.7;\n this.robFac = 0.05;\n this.aiFac = 0.3;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.2\n };\n this.prodMats = [\"Energy\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Utilities:\n case \"Utilities\":\n this.reFac = 0.5;\n this.sciFac = 0.6;\n this.robFac = 0.4;\n this.aiFac = 0.4;\n this.advFac = 0.08;\n this.reqMats = {\n Hardware: 0.1,\n Metal: 0.1\n };\n this.prodMats = [\"Water\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Agriculture:\n this.reFac = 0.72;\n this.sciFac = 0.5;\n this.hwFac = 0.2;\n this.robFac = 0.3;\n this.aiFac = 0.3;\n this.advFac = 0.04;\n this.reqMats = {\n Water: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"Plants\", \"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Fishing:\n this.reFac = 0.15;\n this.sciFac = 0.35;\n this.hwFac = 0.35;\n this.robFac = 0.5;\n this.aiFac = 0.2;\n this.advFac = 0.08;\n this.reqMats = {\n Energy: 0.5\n };\n this.prodMats = [\"Food\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Mining:\n this.reFac = 0.3;\n this.sciFac = 0.26;\n this.hwFac = 0.4;\n this.robFac = 0.45;\n this.aiFac = 0.45;\n this.advFac = 0.06;\n this.reqMats = {\n Energy: 0.8\n };\n this.prodMats = [\"Metal\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n //reFac is unique for this bc it diminishes greatly per city. Handle this separately in code?\n this.sciFac = 0.12;\n this.hwFac = 0.15;\n this.robFac = 0.3;\n this.aiFac = 0.25;\n this.advFac = 0.25;\n this.reFac = 0.05;\n this.reqMats = {\n Food: 0.5,\n Water: 0.5,\n Energy: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n this.reFac = 0.15;\n this.sciFac = 0.75;\n this.hwFac = 0.15;\n this.robFac = 0.2;\n this.aiFac = 0.15;\n this.advFac = 0.2;\n this.reqMats = {\n Plants: 1,\n Water: 0.2\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Chemical:\n this.reFac = 0.25;\n this.sciFac = 0.75;\n this.hwFac = 0.2;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.07;\n this.reqMats = {\n Plants: 1,\n Energy: 0.5,\n Water: 0.5\n };\n this.prodMats = [\"Chemicals\"];\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n this.reFac = 0.05;\n this.sciFac = 0.8;\n this.hwFac = 0.15;\n this.robFac = 0.25;\n this.aiFac = 0.2;\n this.advFac = 0.16;\n this.reqMats = {\n Chemicals: 2,\n Energy: 1,\n Water: 0.5\n };\n this.prodMats = [\"Drugs\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n this.reFac = 0.2;\n this.sciFac = 0.62;\n this.robFac = 0.36;\n this.aiFac = 0.19;\n this.advFac = 0.17;\n this.reqMats = {\n Metal: 2,\n Energy: 1\n };\n this.prodMats = [\"Hardware\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n this.reFac = 0.32;\n this.sciFac = 0.65;\n this.aiFac = 0.36;\n this.advFac = 0.18;\n this.hwFac = 0.19;\n this.reqMats = {\n Hardware: 5,\n Energy: 3\n };\n this.prodMats = [\"Robots\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n this.sciFac = 0.62;\n this.advFac = 0.16;\n this.hwFac = 0.25;\n this.reFac = 0.15;\n this.aiFac = 0.18;\n this.robFac = 0.05;\n this.reqMats = {\n Hardware: 0.5,\n Energy: 0.5\n };\n this.prodMats = [\"AICores\"];\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n this.reFac = 0.1;\n this.sciFac = 0.75;\n this.advFac = 0.11;\n this.hwFac = 0.1;\n this.robFac = 0.1;\n this.aiFac = 0.1;\n this.reqMats = {\n Robots: 10,\n AICores: 5,\n Energy: 5,\n Water: 5\n };\n this.makesProducts = true;\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n this.robFac = 0.6;\n this.aiFac = 0.6;\n this.advFac = 0.25;\n this.sciFac = 0.05;\n this.hwFac = 0.05;\n this.reqMats = {\n Metal: 5,\n Energy: 5,\n Water: 2,\n Hardware: 4\n };\n this.prodMats = [\"RealEstate\"];\n this.makesProducts = true;\n break;\n\n default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText() {\n if (!this.makesProducts) return \"\";\n\n switch (this.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Food:\n return \"create and manage restaurants\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Tobacco:\n return \"create tobacco and tobacco-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics:\n return \"build specialized robots and robot-related products\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software:\n return \"develop computer software\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Healthcare:\n return \"build and manage hospitals\";\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].RealEstate:\n return \"develop and manage real estate properties\";\n\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts() {\n if (!this.makesProducts) return 0; // Calculate additional number of allowed Products from Research/Upgrades\n\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n return _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts() {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n } //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n\n\n calculateProductionFactors() {\n let multSum = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const warehouse = this.warehouses[city];\n\n if (!(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const materials = warehouse.materials;\n const cityMult = Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) * Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) * Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) * Math.pow(0.002 * materials.AICores.qty + 1, this.aiFac);\n multSum += Math.pow(cityMult, 0.73);\n }\n\n multSum < 1 ? this.prodMult = 1 : this.prodMult = multSum;\n }\n\n updateWarehouseSizeUsed(warehouse) {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n warehouse.sizeUsed += prod.data[warehouse.loc][0] * prod.siz;\n\n if (prod.data[warehouse.loc][0] > 0) {\n warehouse.breakdown += prodName + \": \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_16__[/* formatNumber */ \"c\"])(prod.data[warehouse.loc][0] * prod.siz, 0) + \"
\";\n }\n }\n }\n }\n\n process(marketCycles = 1, state, corporation) {\n this.state = state; //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\");\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n }\n\n this.lastCycleRevenue = this.thisCycleRevenue.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses.dividedBy(marketCycles * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle);\n this.thisCycleRevenue = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0);\n this.thisCycleExpenses = new decimal_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"](0); // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n\n if (this.lastCycleRevenue.gt(0)) {\n this.newInd = false;\n } // Process offices (and the employees in them)\n\n\n let employeeSalary = 0;\n\n for (const officeLoc in this.offices) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n\n this.thisCycleExpenses = this.thisCycleExpenses.plus(employeeSalary); // Process change in demand/competition of materials/products\n\n this.processMaterialMarket();\n this.processProductMarket(marketCycles); // Process loss of popularity\n\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity); // Process Dreamsense gains\n\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n\n if (popularityGain > 0) {\n this.popularity += popularityGain * marketCycles;\n this.awareness += awarenessGain * marketCycles;\n }\n\n return;\n } // Process production, purchase, and import/export of materials\n\n\n let res = this.processMaterials(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n } // Process creation, production & sale of products\n\n\n res = this.processProducts(marketCycles, corporation);\n\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue.plus(res[0]);\n this.thisCycleExpenses = this.thisCycleExpenses.plus(res[1]);\n }\n } // Process change in demand and competition for this industry's materials\n\n\n processMaterialMarket() {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats; //Only 'process the market' for materials that this industry deals with\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n //If this industry has a warehouse in this city, process the market\n //for every material this industry requires or produces\n if (this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const wh = this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i]];\n if (wh === 0) continue;\n\n for (const name in reqMats) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n } //Produced materials are stored in an array\n\n\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n } //Process these twice because these boost production\n\n\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n } // Process change in demand and competition for this industry's products\n\n\n processProductMarket(marketCycles = 1) {\n // Demand gradually decreases, and competition gradually increases\n for (const name in this.products) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Pharmaceutical || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Software || this.type === _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* Industries */ \"a\"].Robotics) {\n change *= 3;\n }\n\n change *= marketCycles;\n product.dmd -= change;\n product.cmp += change;\n product.cmp = Math.min(product.cmp, 99.99);\n product.dmd = Math.max(product.dmd, 0.001);\n }\n }\n } //Process production, purchase, and import/export of materials\n\n\n processMaterials(marketCycles = 1, corporation) {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors(); //At the start of the export state, set the imports of everything to 0\n\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n\n if (!(this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n continue;\n }\n\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.imp = 0;\n }\n }\n }\n }\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\":\n {\n /* Process purchase of materials */\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n\n buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (matName == \"RealEstate\") {\n maxAmt = buyAmt;\n } else {\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n }\n\n buyAmt = Math.min(buyAmt, maxAmt);\n\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n // smart supply\n\n\n const smartBuy = {};\n\n for (const matName in warehouse.materials) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n if (!warehouse.smartSupplyEnabled || !Object.keys(this.reqMats).includes(matName)) continue;\n const mat = warehouse.materials[matName]; //Smart supply tracker is stored as per second rate\n\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n mat.buy = reqMat * warehouse.smartSupplyStore;\n let buyAmt = mat.buy * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n } // Find which material were trying to create the least amount of product with.\n\n\n let worseAmt = 1e99;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n const amt = buyAmt / reqMat;\n if (amt < worseAmt) worseAmt = amt;\n } // Align all the materials to the smallest amount.\n\n\n for (const matName in smartBuy) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n } // Calculate the total size of all things were trying to buy\n\n\n let totalSize = 0;\n\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName];\n } // Shrink to the size of available space.\n\n\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n\n if (totalSize > freeSpace) {\n for (const matName in smartBuy) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.floor(buyAmt * freeSpace / totalSize);\n }\n } // Use the materials already in the warehouse if the option is on.\n\n\n for (const matName in smartBuy) {\n if (!warehouse.smartSupplyUseLeftovers[matName]) continue;\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n smartBuy[matName] = Math.max(0, buyAmt - mat.qty);\n } // buy them\n\n\n for (const matName in smartBuy) {\n const mat = warehouse.materials[matName];\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n\n break;\n }\n\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]]; //Calculate the maximum production of this material based\n //on the office's productivity\n\n const maxProd = this.getOfficeProductivity(office) * this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() * this.getProductionMultiplier(); // Multiplier from Research\n\n let prod;\n\n if (mat.prdman[0]) {\n //Production is manually limited\n prod = Math.min(maxProd, mat.prdman[1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n // Calculate net change in warehouse storage making the produced materials will cost\n\n let totalMatSize = 0;\n\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][this.prodMats[tmp]];\n }\n\n for (const reqMatName in this.reqMats) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n } // If not enough space in warehouse, limit the amount of produced materials\n\n\n if (totalMatSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / totalMatSize);\n prod = Math.min(maxAmt, prod);\n }\n\n if (prod < 0) {\n prod = 0;\n } // Keep track of production for smart supply (/s)\n\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); // Make sure we have enough resource to make our materials\n\n let producableFrac = 1;\n\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const req = reqMat * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n } // Make our materials if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in this.reqMats) {\n const reqMat = this.reqMats[reqMatName];\n if (reqMat === undefined) continue;\n const reqMatQtyNeeded = reqMat * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd = 0;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n\n for (let j = 0; j < this.prodMats.length; ++j) {\n warehouse.materials[this.prodMats[j]].qty += prod * producableFrac;\n warehouse.materials[this.prodMats[j]].qlt = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer] / 90 + Math.pow(this.sciResearch.qty, this.sciFac) + Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName in this.reqMats) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n } //Per second\n\n\n const fooProd = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n\n for (let fooI = 0; fooI < this.prodMats.length; ++fooI) {\n warehouse.materials[this.prodMats[fooI]].prd = fooProd;\n }\n } else {\n //If this doesn't produce any materials, then it only creates\n //Products. Creating products will consume materials. The\n //Production of all consumed materials must be set to 0\n for (const reqMatName in this.reqMats) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n } // Sale multipliers\n\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n // Determine the cost that the material will be sold at\n\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n\n if (mat.marketTa2) {\n const prod = mat.prd; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = (mat.qlt + 0.001) * marketFactor * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = mat.bCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + mat.bCost;\n } // We'll store this \"Optimal Price\" in a property so that we don't have\n // to re-calculate it for the UI\n\n\n mat.marketTa2Price = optimalPrice;\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sCost)) {\n sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n } // Calculate how much of the material sells (per second)\n\n\n let markup = 1;\n\n if (sCost > mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - mat.bCost), 2);\n }\n } else if (sCost < mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = mat.bCost / sCost;\n }\n }\n\n const maxSell = (mat.qlt + 0.001) * marketFactor * markup * businessFactor * corporation.getSalesMultiplier() * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = mat.sllman[1].replace(/MAX/g, maxSell + \"\");\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell amount for material \" + mat.name + \" in \" + this.name + \"'s \" + city + \" office. The sell amount \" + \"is being set to zero\");\n sellAmt = 0;\n }\n\n sellAmt = Math.min(maxSell, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = maxSell;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(maxSell, mat.sllman[1]);\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n\n\n break;\n\n case \"EXPORT\":\n for (const matName in warehouse.materials) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(/MAX/g, mat.qty / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles) + \"\");\n let amt = 0;\n\n try {\n amt = eval(amtStr);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Calculating export for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division failed with \" + \"error: \" + e);\n continue;\n }\n\n if (isNaN(amt)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error calculating export amount for \" + mat.name + \" in \" + this.name + \"'s \" + city + \" division.\");\n continue;\n }\n\n amt = amt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n\n if (amt === 0) {\n break; //None left\n }\n\n for (let foo = 0; foo < corporation.divisions.length; ++foo) {\n if (corporation.divisions[foo].name === exp.ind) {\n const expIndustry = corporation.divisions[foo];\n const expWarehouse = expIndustry.warehouses[exp.city];\n\n if (!(expWarehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"])) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n } // Make sure theres enough space in warehouse\n\n\n if (expWarehouse.sizeUsed >= expWarehouse.size) {\n // Warehouse at capacity. Exporting doesnt\n // affect revenue so just return 0's\n return [0, 0];\n } else {\n const maxAmt = Math.floor((expWarehouse.size - expWarehouse.sizeUsed) / _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][matName]);\n amt = Math.min(maxAmt, amt);\n }\n\n expWarehouse.materials[matName].imp += amt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n expWarehouse.materials[matName].qty += amt;\n expWarehouse.materials[matName].qlt = mat.qlt;\n mat.qty -= amt;\n mat.totalExp += amt;\n expIndustry.updateWarehouseSizeUsed(expWarehouse);\n break;\n }\n }\n } //totalExp should be per second\n\n\n mat.totalExp /= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n\n\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n\n\n if (office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_9__[/* OfficeSpace */ \"a\"]) {\n this.sciResearch.qty += 0.004 * Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].RandD], 0.5) * corporation.getScientificResearchMultiplier() * this.getScientificResearchMultiplier();\n }\n }\n\n return [revenue, expenses];\n } //Process production & sale of this industry's FINISHED products (including all of their stats)\n\n\n processProducts(marketCycles = 1, corporation) {\n let revenue = 0;\n const expenses = 0; //Create products\n\n if (this.state === \"PRODUCTION\") {\n for (const prodName in this.products) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue; // Designing/Creating a Product is based mostly off Engineers\n\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const total = engrProd + mgmtProd + opProd;\n\n if (total <= 0) {\n break;\n } // Management is a multiplier for the production from Engineers\n\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n prod.createProduct(marketCycles, progress);\n\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n\n break;\n }\n }\n } //Produce Products\n\n\n for (const prodName in this.products) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n\n if (prod instanceof _Product__WEBPACK_IMPORTED_MODULE_10__[/* Product */ \"a\"] && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n\n return [revenue, expenses];\n } //Processes FINISHED products\n\n\n processProduct(marketCycles = 1, product, corporation) {\n let totalProfit = 0;\n\n for (let i = 0; i < _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities.length; ++i) {\n const city = _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n\n if (warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_14__[/* Warehouse */ \"a\"]) {\n switch (this.state) {\n case \"PRODUCTION\":\n {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd = this.getOfficeProductivity(office, {\n forProduct: true\n }) * corporation.getProductionMultiplier() * this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n\n let prod; //Account for whether production is manually limited\n\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n\n prod *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles; //Calculate net change in warehouse storage making the Products will cost\n\n let netStorageSize = product.siz;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= _MaterialSizes__WEBPACK_IMPORTED_MODULE_13__[/* MaterialSizes */ \"a\"][reqMatName] * normQty;\n }\n } //If there's not enough space in warehouse, limit the amount of Product\n\n\n if (netStorageSize > 0) {\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / netStorageSize);\n prod = Math.min(maxAmt, prod);\n }\n\n warehouse.smartSupplyStore += prod / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //Make sure we have enough resources to make our Products\n\n let producableFrac = 1;\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n } //Make our Products if they are producable\n\n\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const reqMatQtyNeeded = product.reqMats[reqMatName] * prod * producableFrac;\n warehouse.materials[reqMatName].qty -= reqMatQtyNeeded;\n warehouse.materials[reqMatName].prd -= reqMatQtyNeeded / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n }\n } //Quantity\n\n\n product.data[city][0] += prod * producableFrac;\n } //Keep track of production Per second\n\n\n product.data[city][1] = prod * producableFrac / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles);\n break;\n }\n\n case \"SALE\":\n {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n\n for (const reqMatName in product.reqMats) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n } // Since its a product, its production cost is increased for labor\n\n\n product.pCost *= _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio; // Sale multipliers\n\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n\n const markupLimit = product.rat / product.mku;\n let sCost;\n\n if (product.marketTa2) {\n const prod = product.data[city][1]; // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'roduct.pCost = sCost\n\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * businessFactor * advertisingFactor * this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\n\n if (sqrtDenominator === 0 || denominator === 0) {\n if (sqrtNumerator === 0) {\n optimalPrice = 0; // No production\n } else {\n optimalPrice = product.pCost + markupLimit;\n console.warn(`In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost`);\n }\n } else {\n optimalPrice = numerator / denominator + product.pCost;\n } // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n\n\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sCost)) {\n const sCostString = product.sCost;\n\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\n }\n\n sCost = sCostString.replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sCost = eval(sCost);\n } else {\n sCost = product.sCost;\n }\n\n let markup = 1;\n\n if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n const maxSell = 0.5 * Math.pow(product.rat, 0.65) * marketFactor * corporation.getSalesMultiplier() * Math.pow(markup, 2) * businessFactor * advertisingFactor * this.getSalesMultiplier();\n let sellAmt;\n\n if (product.sllman[city][0] && Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_12__[/* isString */ \"a\"])(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, maxSell);\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n\n try {\n tmp = eval(tmp);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_11__[/* dialogBoxCreate */ \"a\"])(\"Error evaluating your sell price expression for \" + product.name + \" in \" + this.name + \"'s \" + city + \" office. Sell price is being set to MAX\");\n tmp = maxSell;\n }\n\n sellAmt = Math.min(maxSell, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(maxSell, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = maxSell;\n }\n\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n\n sellAmt = sellAmt * _data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (_data_Constants__WEBPACK_IMPORTED_MODULE_4__[/* CorporationConstants */ \"a\"].SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n\n break;\n }\n\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n\n }\n }\n\n return totalProfit;\n }\n\n discontinueProduct(product) {\n for (const productName in this.products) {\n if (this.products.hasOwnProperty(productName)) {\n if (product === this.products[productName]) {\n delete this.products[productName];\n }\n }\n }\n }\n\n upgrade(upgrade, refs) {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0:\n {\n //Coffee, 5% energy per employee\n for (let i = 0; i < office.employees.length; ++i) {\n office.employees[i].ene = Math.min(office.employees[i].ene * 1.05, office.maxEne);\n }\n\n break;\n }\n\n case 1:\n {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n this.awareness += 3 * advMult;\n this.popularity += 1 * advMult;\n this.awareness *= 1.01 * advMult;\n this.popularity *= (1 + Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_7__[/* getRandomInt */ \"a\"])(1, 3) / 100) * advMult;\n break;\n }\n\n default:\n {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n } // Returns how much of a material can be produced based of office productivity (employee stats)\n\n\n getOfficeProductivity(office, params = {}) {\n const opProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Operations];\n const engrProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Engineer];\n const mgmtProd = office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Management];\n const total = opProd + engrProd + mgmtProd;\n if (total <= 0) return 0; // Management is a multiplier for the production from Operations and Engineers\n\n const mgmtFactor = 1 + mgmtProd / (1.2 * total); // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor; // Generic multiplier for the production. Used for game-balancing purposes\n\n const balancingMult = 0.05;\n\n if (params && params.forProduct) {\n // Products are harder to create and therefore have less production\n return 0.5 * balancingMult * prod;\n } else {\n return balancingMult * prod;\n }\n } // Returns a multiplier based on the office' 'Business' employees that affects sales\n\n\n getBusinessFactor(office) {\n const businessProd = 1 + office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_5__[/* EmployeePositions */ \"a\"].Business];\n return Object(_utils_calculateEffectWithFactors__WEBPACK_IMPORTED_MODULE_8__[/* calculateEffectWithFactors */ \"a\"])(businessProd, 0.26, 10e3);\n } //Returns a set of multipliers based on the Industry's awareness, popularity, and advFac. This\n //multiplier affects sales. The result is:\n // [Total sales mult, total awareness mult, total pop mult, awareness/pop ratio mult]\n\n\n getAdvertisingFactors() {\n const awarenessFac = Math.pow(this.awareness + 1, this.advFac);\n const popularityFac = Math.pow(this.popularity + 1, this.advFac);\n const ratioFac = this.awareness === 0 ? 0.01 : Math.max((this.popularity + 0.001) / this.awareness, 0.01);\n const totalFac = Math.pow(awarenessFac * popularityFac * ratioFac, 0.85);\n return [totalFac, awarenessFac, popularityFac, ratioFac];\n } //Returns a multiplier based on a materials demand and competition that affects sales\n\n\n getMarketFactor(mat) {\n return Math.max(0.1, mat.dmd * (100 - mat.cmp) / 100);\n } // Returns a boolean indicating whether this Industry has the specified Research\n\n\n hasResearch(name) {\n return this.researched[name] === true;\n }\n\n updateResearchTree() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`); // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research in this.researched) {\n researchTree.research(research);\n }\n }\n } // Get multipliers from Research\n\n\n getAdvertisingMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier() {\n const researchTree = _IndustryData__WEBPACK_IMPORTED_MODULE_3__[/* IndustryResearchTrees */ \"c\"][this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n copy() {\n // products: { [key: string]: Product | undefined } = {};\n // //Maps locations to warehouses. 0 if no warehouse at that location\n // warehouses: { [key: string]: Warehouse | 0 };\n // //Maps locations to offices. 0 if no office at that location\n // offices: { [key: string]: OfficeSpace | 0 } = {\n // [CityName.Aevum]: 0,\n // [CityName.Chongqing]: 0,\n // [CityName.Sector12]: new OfficeSpace({\n // loc: CityName.Sector12,\n // size: CorporationConstants.OfficeInitialSize,\n // }),\n // [CityName.NewTokyo]: 0,\n // [CityName.Ishima]: 0,\n // [CityName.Volhaven]: 0,\n // };\n const division = new Industry();\n division.sciResearch = this.sciResearch.copy();\n division.researched = {};\n\n for (const x of Object.keys(this.researched)) {\n division.researched[x] = this.researched[x];\n }\n\n division.reqMats = {};\n\n for (const x of Object.keys(this.reqMats)) {\n division.reqMats[x] = this.reqMats[x];\n }\n\n division.name = this.name;\n division.type = this.type;\n division.makesProducts = this.makesProducts;\n division.awareness = this.awareness;\n division.popularity = this.popularity;\n division.startingCost = this.startingCost;\n division.reFac = this.reFac;\n division.sciFac = this.sciFac;\n division.hwFac = this.hwFac;\n division.robFac = this.robFac;\n division.aiFac = this.aiFac;\n division.advFac = this.advFac;\n division.prodMult = this.prodMult;\n division.state = this.state;\n division.newInd = this.newInd;\n division.lastCycleRevenue = this.lastCycleRevenue.plus(0);\n division.lastCycleExpenses = this.lastCycleExpenses.plus(0);\n division.thisCycleRevenue = this.thisCycleRevenue.plus(0);\n division.thisCycleExpenses = this.thisCycleExpenses.plus(0);\n division.upgrades = this.upgrades.slice();\n division.prodMats = this.prodMats.slice();\n return division;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_toJSON */ \"b\"])(\"Industry\", this);\n }\n /**\n * Initiatizes a Industry object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Generic_fromJSON */ \"a\"])(Industry, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_0__[/* Reviver */ \"c\"].constructors.Industry = Industry;\n\n//# sourceURL=webpack:///./src/Corporation/Industry.ts?"); /***/ }), /* 699 */ @@ -4341,7 +4341,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMember; });\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GangMemberTask */ 440);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberUpgrades */ 154);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass GangMember {\n // Names of upgrades\n // Names of augmentations only\n constructor(name = \"\") {\n _defineProperty(this, \"task\", \"Unassigned\");\n\n _defineProperty(this, \"earnedRespect\", 0);\n\n _defineProperty(this, \"hack\", 1);\n\n _defineProperty(this, \"str\", 1);\n\n _defineProperty(this, \"def\", 1);\n\n _defineProperty(this, \"dex\", 1);\n\n _defineProperty(this, \"agi\", 1);\n\n _defineProperty(this, \"cha\", 1);\n\n _defineProperty(this, \"hack_exp\", 0);\n\n _defineProperty(this, \"str_exp\", 0);\n\n _defineProperty(this, \"def_exp\", 0);\n\n _defineProperty(this, \"dex_exp\", 0);\n\n _defineProperty(this, \"agi_exp\", 0);\n\n _defineProperty(this, \"cha_exp\", 0);\n\n _defineProperty(this, \"hack_mult\", 1);\n\n _defineProperty(this, \"str_mult\", 1);\n\n _defineProperty(this, \"def_mult\", 1);\n\n _defineProperty(this, \"dex_mult\", 1);\n\n _defineProperty(this, \"agi_mult\", 1);\n\n _defineProperty(this, \"cha_mult\", 1);\n\n _defineProperty(this, \"hack_asc_points\", 0);\n\n _defineProperty(this, \"str_asc_points\", 0);\n\n _defineProperty(this, \"def_asc_points\", 0);\n\n _defineProperty(this, \"dex_asc_points\", 0);\n\n _defineProperty(this, \"agi_asc_points\", 0);\n\n _defineProperty(this, \"cha_asc_points\", 0);\n\n _defineProperty(this, \"upgrades\", []);\n\n _defineProperty(this, \"augmentations\", []);\n\n this.name = name;\n }\n\n calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points) {\n return Math.max(Math.pow(points / 4000, 0.7), 1);\n }\n\n updateSkillLevels() {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower() {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n\n this.task = taskName;\n return true;\n }\n\n unassignFromTask() {\n this.task = \"Unassigned\";\n }\n\n getTask() {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if (this.task instanceof _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__[/* GangMemberTask */ \"a\"]) {\n this.task = this.task.name;\n }\n\n if (_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.task)) {\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][this.task];\n }\n\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"];\n }\n\n calculateRespectGain(gang) {\n const task = this.getTask();\n if (task.baseRespect === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.respect) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 11 * task.baseRespect * statWeight * territoryMult * respectMult;\n }\n\n calculateWantedLevelGain(gang) {\n const task = this.getTask();\n if (task.baseWanted === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n\n const calc = 7 * task.baseWanted / Math.pow(3 * statWeight * territoryMult, 0.8); // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n\n return Math.min(100, calc);\n }\n\n calculateMoneyGain(gang) {\n const task = this.getTask();\n if (task.baseMoney === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 5 * task.baseMoney * statWeight * territoryMult * respectMult;\n }\n\n expMult() {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1\n };\n }\n\n gainExperience(numCycles = 1) {\n const task = this.getTask();\n if (task === _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp += task.hackWeight / weightDivisor * difficultyPerCycles * expMult.hack;\n this.str_exp += task.strWeight / weightDivisor * difficultyPerCycles * expMult.str;\n this.def_exp += task.defWeight / weightDivisor * difficultyPerCycles * expMult.def;\n this.dex_exp += task.dexWeight / weightDivisor * difficultyPerCycles * expMult.dex;\n this.agi_exp += task.agiWeight / weightDivisor * difficultyPerCycles * expMult.agi;\n this.cha_exp += task.chaWeight / weightDivisor * difficultyPerCycles * expMult.cha;\n }\n\n recordEarnedRespect(numCycles = 1, gang) {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints() {\n return {\n hack: Math.max(this.hack_exp - 1000, 0),\n str: Math.max(this.str_exp - 1000, 0),\n def: Math.max(this.def_exp - 1000, 0),\n dex: Math.max(this.dex_exp - 1000, 0),\n agi: Math.max(this.agi_exp - 1000, 0),\n cha: Math.max(this.cha_exp - 1000, 0)\n };\n }\n\n canAscend() {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getAscensionResults() {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack) / this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points + points.str) / this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points + points.def) / this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex) / this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi) / this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha) / this.calculateAscensionMult(this.cha_asc_points)\n };\n }\n\n ascend() {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha; // Remove upgrades. Then re-calculate multipliers and stats\n\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberUpgrades */ \"a\"][this.augmentations[i]];\n this.applyUpgrade(aug);\n } // Clear exp and recalculate stats\n\n\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha\n };\n }\n\n applyUpgrade(upg) {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg, player, gang) {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n if (player.money.lt(gang.getUpgradeCost(upg))) return false;\n player.loseMoney(gang.getUpgradeCost(upg));\n\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n\n this.applyUpgrade(upg);\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"GangMember\", this);\n }\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(GangMember, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.GangMember = GangMember;\n\n//# sourceURL=webpack:///./src/Gang/GangMember.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMember; });\n/* harmony import */ var _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./GangMemberTask */ 441);\n/* harmony import */ var _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GangMemberTasks */ 177);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./GangMemberUpgrades */ 154);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AllGangs */ 59);\n/* harmony import */ var _utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/JSONReviver */ 15);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\nclass GangMember {\n // Names of upgrades\n // Names of augmentations only\n constructor(name = \"\") {\n _defineProperty(this, \"task\", \"Unassigned\");\n\n _defineProperty(this, \"earnedRespect\", 0);\n\n _defineProperty(this, \"hack\", 1);\n\n _defineProperty(this, \"str\", 1);\n\n _defineProperty(this, \"def\", 1);\n\n _defineProperty(this, \"dex\", 1);\n\n _defineProperty(this, \"agi\", 1);\n\n _defineProperty(this, \"cha\", 1);\n\n _defineProperty(this, \"hack_exp\", 0);\n\n _defineProperty(this, \"str_exp\", 0);\n\n _defineProperty(this, \"def_exp\", 0);\n\n _defineProperty(this, \"dex_exp\", 0);\n\n _defineProperty(this, \"agi_exp\", 0);\n\n _defineProperty(this, \"cha_exp\", 0);\n\n _defineProperty(this, \"hack_mult\", 1);\n\n _defineProperty(this, \"str_mult\", 1);\n\n _defineProperty(this, \"def_mult\", 1);\n\n _defineProperty(this, \"dex_mult\", 1);\n\n _defineProperty(this, \"agi_mult\", 1);\n\n _defineProperty(this, \"cha_mult\", 1);\n\n _defineProperty(this, \"hack_asc_points\", 0);\n\n _defineProperty(this, \"str_asc_points\", 0);\n\n _defineProperty(this, \"def_asc_points\", 0);\n\n _defineProperty(this, \"dex_asc_points\", 0);\n\n _defineProperty(this, \"agi_asc_points\", 0);\n\n _defineProperty(this, \"cha_asc_points\", 0);\n\n _defineProperty(this, \"upgrades\", []);\n\n _defineProperty(this, \"augmentations\", []);\n\n this.name = name;\n }\n\n calculateSkill(exp, mult = 1) {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points) {\n return Math.max(Math.pow(points / 4000, 0.7), 1);\n }\n\n updateSkillLevels() {\n this.hack = this.calculateSkill(this.hack_exp, this.hack_mult * this.calculateAscensionMult(this.hack_asc_points));\n this.str = this.calculateSkill(this.str_exp, this.str_mult * this.calculateAscensionMult(this.str_asc_points));\n this.def = this.calculateSkill(this.def_exp, this.def_mult * this.calculateAscensionMult(this.def_asc_points));\n this.dex = this.calculateSkill(this.dex_exp, this.dex_mult * this.calculateAscensionMult(this.dex_asc_points));\n this.agi = this.calculateSkill(this.agi_exp, this.agi_mult * this.calculateAscensionMult(this.agi_asc_points));\n this.cha = this.calculateSkill(this.cha_exp, this.cha_mult * this.calculateAscensionMult(this.cha_asc_points));\n }\n\n calculatePower() {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName) {\n if (!_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n\n this.task = taskName;\n return true;\n }\n\n unassignFromTask() {\n this.task = \"Unassigned\";\n }\n\n getTask() {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if (this.task instanceof _GangMemberTask__WEBPACK_IMPORTED_MODULE_0__[/* GangMemberTask */ \"a\"]) {\n this.task = this.task.name;\n }\n\n if (_GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"].hasOwnProperty(this.task)) {\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][this.task];\n }\n\n return _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"];\n }\n\n calculateRespectGain(gang) {\n const task = this.getTask();\n if (task.baseRespect === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.respect) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 11 * task.baseRespect * statWeight * territoryMult * respectMult;\n }\n\n calculateWantedLevelGain(gang) {\n const task = this.getTask();\n if (task.baseWanted === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n\n const calc = 7 * task.baseWanted / Math.pow(3 * statWeight * territoryMult, 0.8); // Put an arbitrary cap on this to prevent wanted level from rising too fast if the\n // denominator is very small. Might want to rethink formula later\n\n return Math.min(100, calc);\n }\n\n calculateMoneyGain(gang) {\n const task = this.getTask();\n if (task.baseMoney === 0) return 0;\n let statWeight = task.hackWeight / 100 * this.hack + task.strWeight / 100 * this.str + task.defWeight / 100 * this.def + task.dexWeight / 100 * this.dex + task.agiWeight / 100 * this.agi + task.chaWeight / 100 * this.cha;\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(_AllGangs__WEBPACK_IMPORTED_MODULE_3__[/* AllGangs */ \"a\"][gang.facName].territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = gang.getWantedPenalty();\n return 5 * task.baseMoney * statWeight * territoryMult * respectMult;\n }\n\n expMult() {\n return {\n hack: (this.hack_mult - 1) / 4 + 1,\n str: (this.str_mult - 1) / 4 + 1,\n def: (this.def_mult - 1) / 4 + 1,\n dex: (this.dex_mult - 1) / 4 + 1,\n agi: (this.agi_mult - 1) / 4 + 1,\n cha: (this.cha_mult - 1) / 4 + 1\n };\n }\n\n gainExperience(numCycles = 1) {\n const task = this.getTask();\n if (task === _GangMemberTasks__WEBPACK_IMPORTED_MODULE_1__[/* GangMemberTasks */ \"a\"][\"Unassigned\"]) return;\n const difficultyMult = Math.pow(task.difficulty, 0.9);\n const difficultyPerCycles = difficultyMult * numCycles;\n const weightDivisor = 1500;\n const expMult = this.expMult();\n this.hack_exp += task.hackWeight / weightDivisor * difficultyPerCycles * expMult.hack;\n this.str_exp += task.strWeight / weightDivisor * difficultyPerCycles * expMult.str;\n this.def_exp += task.defWeight / weightDivisor * difficultyPerCycles * expMult.def;\n this.dex_exp += task.dexWeight / weightDivisor * difficultyPerCycles * expMult.dex;\n this.agi_exp += task.agiWeight / weightDivisor * difficultyPerCycles * expMult.agi;\n this.cha_exp += task.chaWeight / weightDivisor * difficultyPerCycles * expMult.cha;\n }\n\n recordEarnedRespect(numCycles = 1, gang) {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints() {\n return {\n hack: Math.max(this.hack_exp - 1000, 0),\n str: Math.max(this.str_exp - 1000, 0),\n def: Math.max(this.def_exp - 1000, 0),\n dex: Math.max(this.dex_exp - 1000, 0),\n agi: Math.max(this.agi_exp - 1000, 0),\n cha: Math.max(this.cha_exp - 1000, 0)\n };\n }\n\n canAscend() {\n const points = this.getGainedAscensionPoints();\n return points.hack > 0 || points.str > 0 || points.def > 0 || points.dex > 0 || points.agi > 0 || points.cha > 0;\n }\n\n getAscensionResults() {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack) / this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points + points.str) / this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points + points.def) / this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex) / this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi) / this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha) / this.calculateAscensionMult(this.cha_asc_points)\n };\n }\n\n ascend() {\n const res = this.getAscensionResults();\n const points = this.getGainedAscensionPoints();\n this.hack_asc_points += points.hack;\n this.str_asc_points += points.str;\n this.def_asc_points += points.def;\n this.dex_asc_points += points.dex;\n this.agi_asc_points += points.agi;\n this.cha_asc_points += points.cha; // Remove upgrades. Then re-calculate multipliers and stats\n\n this.upgrades.length = 0;\n this.hack_mult = 1;\n this.str_mult = 1;\n this.def_mult = 1;\n this.dex_mult = 1;\n this.agi_mult = 1;\n this.cha_mult = 1;\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* GangMemberUpgrades */ \"a\"][this.augmentations[i]];\n this.applyUpgrade(aug);\n } // Clear exp and recalculate stats\n\n\n this.hack_exp = 0;\n this.str_exp = 0;\n this.def_exp = 0;\n this.dex_exp = 0;\n this.agi_exp = 0;\n this.cha_exp = 0;\n this.updateSkillLevels();\n const respectToDeduct = this.earnedRespect;\n this.earnedRespect = 0;\n return {\n respect: respectToDeduct,\n hack: res.hack,\n str: res.str,\n def: res.def,\n dex: res.dex,\n agi: res.agi,\n cha: res.cha\n };\n }\n\n applyUpgrade(upg) {\n if (upg.mults.str != null) this.str_mult *= upg.mults.str;\n if (upg.mults.def != null) this.def_mult *= upg.mults.def;\n if (upg.mults.dex != null) this.dex_mult *= upg.mults.dex;\n if (upg.mults.agi != null) this.agi_mult *= upg.mults.agi;\n if (upg.mults.cha != null) this.cha_mult *= upg.mults.cha;\n if (upg.mults.hack != null) this.hack_mult *= upg.mults.hack;\n }\n\n buyUpgrade(upg, player, gang) {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n if (player.money.lt(gang.getUpgradeCost(upg))) return false;\n player.loseMoney(gang.getUpgradeCost(upg));\n\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n\n this.applyUpgrade(upg);\n return true;\n }\n /**\n * Serialize the current object to a JSON save state.\n */\n\n\n toJSON() {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_toJSON */ \"b\"])(\"GangMember\", this);\n }\n /**\n * Initiatizes a GangMember object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\n\n static fromJSON(value) {\n return Object(_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Generic_fromJSON */ \"a\"])(GangMember, value.data);\n }\n\n}\n_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_4__[/* Reviver */ \"c\"].constructors.GangMember = GangMember;\n\n//# sourceURL=webpack:///./src/Gang/GangMember.ts?"); /***/ }), /* 703 */ @@ -4353,7 +4353,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrade; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 119);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n\n\nclass GangMemberUpgrade {\n constructor(name = \"\", cost = 0, type = _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon, mults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n this.desc = this.createDescription();\n }\n\n createDescription() {\n const lines = [\"Effects:\"];\n\n if (this.mults.str != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n\n if (this.mults.def != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n\n if (this.mults.dex != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n\n if (this.mults.agi != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n\n if (this.mults.cha != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n\n if (this.mults.hack != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n\n return lines.join(\"
\");\n } // User friendly version of type.\n\n\n getType() {\n switch (this.type) {\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon:\n return \"Weapon\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Armor:\n return \"Armor\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Vehicle:\n return \"Vehicle\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Rootkit:\n return \"Rootkit\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Augmentation:\n return \"Augmentation\";\n\n default:\n return \"\";\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrade.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgrade; });\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./data/upgrades */ 120);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n\n\nclass GangMemberUpgrade {\n constructor(name = \"\", cost = 0, type = _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon, mults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n this.desc = this.createDescription();\n }\n\n createDescription() {\n const lines = [\"Effects:\"];\n\n if (this.mults.str != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n\n if (this.mults.def != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n\n if (this.mults.dex != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n\n if (this.mults.agi != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n\n if (this.mults.cha != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n\n if (this.mults.hack != null) {\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n\n return lines.join(\"
\");\n } // User friendly version of type.\n\n\n getType() {\n switch (this.type) {\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Weapon:\n return \"Weapon\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Armor:\n return \"Armor\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Vehicle:\n return \"Vehicle\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Rootkit:\n return \"Rootkit\";\n\n case _data_upgrades__WEBPACK_IMPORTED_MODULE_0__[/* UpgradeType */ \"a\"].Augmentation:\n return \"Augmentation\";\n\n default:\n return \"\";\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Gang/GangMemberUpgrade.ts?"); /***/ }), /* 704 */ @@ -4425,7 +4425,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessCorporation\", function() { return canAccessCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCorporation\", function() { return hasCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCorporation\", function() { return startCorporation; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Corporation/Corporation */ 260);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessCorporation() {\n return this.bitNodeN === 3 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][3] > 0;\n}\nfunction hasCorporation() {\n if (this.corporation == null) {\n return false;\n }\n\n return this.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"];\n}\nfunction startCorporation(corpName, additionalShares = 0) {\n this.corporation = new _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]({\n name: corpName\n });\n this.corporation.totalShares += additionalShares;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessCorporation\", function() { return canAccessCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasCorporation\", function() { return hasCorporation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCorporation\", function() { return startCorporation; });\n/* harmony import */ var _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Corporation/Corporation */ 261);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n\n\nfunction canAccessCorporation() {\n return this.bitNodeN === 3 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"][3] > 0;\n}\nfunction hasCorporation() {\n if (this.corporation == null) {\n return false;\n }\n\n return this.corporation instanceof _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"];\n}\nfunction startCorporation(corpName, additionalShares = 0) {\n this.corporation = new _Corporation_Corporation__WEBPACK_IMPORTED_MODULE_0__[/* Corporation */ \"a\"]({\n name: corpName\n });\n this.corporation.totalShares += additionalShares;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.js?"); /***/ }), /* 710 */ @@ -4437,7 +4437,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessGang\", function() { return canAccessGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangFaction\", function() { return getGangFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangName\", function() { return getGangName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGangWith\", function() { return hasGangWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inGang\", function() { return inGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startGang\", function() { return startGang; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Gang/Gang */ 393);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\n // Amount of negative karma needed to manage a gang in BitNodes other than 2\n\nconst GangKarmaRequirement = -54000;\nfunction canAccessGang() {\n if (this.bitNodeN === 2) {\n return true;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__[/* SourceFileFlags */ \"a\"][2] <= 0) {\n return false;\n }\n\n return this.karma <= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement * GangKarmaRequirement;\n}\nfunction getGangFaction() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][this.gang.facName];\n\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);\n }\n\n return fac;\n}\nfunction getGangName() {\n return this.inGang() ? this.gang.facName : \"\";\n}\nfunction hasGangWith(facName) {\n return this.inGang() && this.gang.facName === facName;\n}\nfunction inGang() {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"];\n}\nfunction startGang(factionName, hacking) {\n this.gang = new _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"](factionName, hacking);\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][factionName];\n\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n\n fac.playerReputation = 0;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessGang\", function() { return canAccessGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangFaction\", function() { return getGangFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getGangName\", function() { return getGangName; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasGangWith\", function() { return hasGangWith; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"inGang\", function() { return inGang; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startGang\", function() { return startGang; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Gang/Gang */ 394);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n\n\n\n // Amount of negative karma needed to manage a gang in BitNodes other than 2\n\nconst GangKarmaRequirement = -54000;\nfunction canAccessGang() {\n if (this.bitNodeN === 2) {\n return true;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_2__[/* SourceFileFlags */ \"a\"][2] <= 0) {\n return false;\n }\n\n return this.karma <= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_3__[/* BitNodeMultipliers */ \"a\"].GangKarmaRequirement * GangKarmaRequirement;\n}\nfunction getGangFaction() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][this.gang.facName];\n\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${this.gang.facName}`);\n }\n\n return fac;\n}\nfunction getGangName() {\n return this.inGang() ? this.gang.facName : \"\";\n}\nfunction hasGangWith(facName) {\n return this.inGang() && this.gang.facName === facName;\n}\nfunction inGang() {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"];\n}\nfunction startGang(factionName, hacking) {\n this.gang = new _Gang_Gang__WEBPACK_IMPORTED_MODULE_1__[/* Gang */ \"a\"](factionName, hacking);\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][factionName];\n\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n\n fac.playerReputation = 0;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.js?"); /***/ }), /* 711 */ @@ -4449,7 +4449,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeAugmentation\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeSourceFile\", function() { return prestigeSourceFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveInvite\", function() { return receiveInvite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSkill\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSkillLevels\", function() { return updateSkillLevels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetMultipliers\", function() { return resetMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasProgram\", function() { return hasProgram; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMoney\", function() { return setMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainMoney\", function() { return gainMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loseMoney\", function() { return loseMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAfford\", function() { return canAfford; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recordMoneySource\", function() { return recordMoneySource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainHackingExp\", function() { return gainHackingExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainStrengthExp\", function() { return gainStrengthExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDefenseExp\", function() { return gainDefenseExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDexterityExp\", function() { return gainDexterityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainAgilityExp\", function() { return gainAgilityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCharismaExp\", function() { return gainCharismaExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainIntelligenceExp\", function() { return gainIntelligenceExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queryStatFromString\", function() { return queryStatFromString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetWorkStatus\", function() { return resetWorkStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processWorkEarnings\", function() { return processWorkEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWork\", function() { return startWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelationPenalty\", function() { return cancelationPenalty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"work\", function() { return work; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWork\", function() { return finishWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWorkPartTime\", function() { return startWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workPartTime\", function() { return workPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWorkPartTime\", function() { return finishWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFocusing\", function() { return startFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stopFocusing\", function() { return stopFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionWork\", function() { return startFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionHackWork\", function() { return startFactionHackWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionFieldWork\", function() { return startFactionFieldWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionSecurityWork\", function() { return startFactionSecurityWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workForFaction\", function() { return workForFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishFactionWork\", function() { return finishFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkMoneyGain\", function() { return getWorkMoneyGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkHackExpGain\", function() { return getWorkHackExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkStrExpGain\", function() { return getWorkStrExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDefExpGain\", function() { return getWorkDefExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDexExpGain\", function() { return getWorkDexExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkAgiExpGain\", function() { return getWorkAgiExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkChaExpGain\", function() { return getWorkChaExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkRepGain\", function() { return getWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCreateProgramWork\", function() { return startCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createProgramWork\", function() { return createProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCreateProgramWork\", function() { return finishCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startClass\", function() { return startClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeClass\", function() { return takeClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishClass\", function() { return finishClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCrime\", function() { return startCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commitCrime\", function() { return commitCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCrime\", function() { return finishCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"singularityStopWork\", function() { return singularityStopWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeDamage\", function() { return takeDamage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regenerateHp\", function() { return regenerateHp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hospitalize\", function() { return hospitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForJob\", function() { return applyForJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextCompanyPosition\", function() { return getNextCompanyPosition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quitJob\", function() { return quitJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareJob\", function() { return applyForSoftwareJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareConsultantJob\", function() { return applyForSoftwareConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForItJob\", function() { return applyForItJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityEngineerJob\", function() { return applyForSecurityEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForNetworkEngineerJob\", function() { return applyForNetworkEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessJob\", function() { return applyForBusinessJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessConsultantJob\", function() { return applyForBusinessConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityJob\", function() { return applyForSecurityJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForAgentJob\", function() { return applyForAgentJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForEmployeeJob\", function() { return applyForEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeEmployeeJob\", function() { return applyForPartTimeEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForWaiterJob\", function() { return applyForWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeWaiterJob\", function() { return applyForPartTimeWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isQualified\", function() { return isQualified; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllAugmentations\", function() { return reapplyAllAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllSourceFiles\", function() { return reapplyAllSourceFiles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkForFactionInvitations\", function() { return checkForFactionInvitations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBitNodeNumber\", function() { return setBitNodeNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queueAugmentation\", function() { return queueAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCodingContractReward\", function() { return gainCodingContractReward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"travel\", function() { return travel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gotoLocation\", function() { return gotoLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessResleeving\", function() { return canAccessResleeving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"giveExploit\", function() { return giveExploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIntelligenceBonus\", function() { return getIntelligenceBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCasinoWinnings\", function() { return getCasinoWinnings; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 273);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Company/GetNextCompanyPosition */ 474);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 395);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Crime/CrimeHelpers */ 352);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Gang/AllGangs */ 59);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Locations/Cities */ 104);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Locations/Locations */ 223);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../formulas/skill */ 198);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../formulas/intelligence */ 310);\n/* harmony import */ var _formulas_reputation__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../formulas/reputation */ 188);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../SourceFile/applySourceFile */ 713);\n/* harmony import */ var _Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../Exploits/applyExploits */ 714);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 277);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../StockMarket/PlayerInfluencing */ 394);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../Hospital/Hospital */ 308);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 291);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n /* Initialize Player's home computer */\n var t_homeComp = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: \"home\",\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true\n });\n this.homeComputer = t_homeComp.ip;\n this.currentServer = t_homeComp.ip;\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AddToAllServers */ \"a\"])(t_homeComp);\n this.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_13__[/* Programs */ \"a\"].NukeProgram.name);\n}\nfunction prestigeAugmentation() {\n var homeComp = this.getHomeComputer();\n this.currentServer = homeComp.ip;\n this.homeComputer = homeComp.ip;\n this.numPeopleKilled = 0;\n this.karma = 0; //Reset stats\n\n this.hacking_skill = 1;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n this.charisma = 1;\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](1000);\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12;\n this.location = \"\";\n this.companyName = \"\";\n this.jobs = {};\n this.purchasedServers = [];\n this.factions = [];\n this.factionInvitations = [];\n this.queuedAugmentations = [];\n this.resleeves = [];\n let numSleeves = Math.min(3, _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.lastUpdate = new Date().getTime(); // Statistics Trackers\n\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n this.hacknetNodes.length = 0;\n this.hashManager.prestige(); // Reapply augs, re-calculate skills and reset HP\n\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\nfunction prestigeSourceFile() {\n this.prestigeAugmentation(); // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0; // Gang\n\n this.gang = null;\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__[/* resetGangs */ \"c\"])(); // Reset Stock market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; // BitNode 3: Corporatocracy\n\n this.corporation = 0;\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\nfunction receiveInvite(factionName) {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n\n this.firstFacInvRecvd = true;\n this.factionInvitations.push(factionName);\n} //Calculates skill level based on experience. The same formula will be used for every skill\n\nfunction calculateSkill(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(exp, mult);\n}\nfunction updateSkillLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n var ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\nfunction resetMultipliers() {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n this.work_money_mult = 1;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\nfunction hasProgram(programName) {\n const home = this.getHomeComputer();\n\n if (home == null) {\n return false;\n }\n\n for (var i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n return false;\n}\nfunction setMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](money);\n}\nfunction gainMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money.plus(money);\n}\nfunction loseMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\n}\nfunction canAfford(cost) {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n\n return this.money.gte(cost);\n}\nfunction recordMoneySource(amt, source) {\n if (!(this.moneySourceA instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n if (!(this.moneySourceB instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\nfunction gainHackingExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n\n this.hacking_exp += exp;\n\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking_skill = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier);\n}\nfunction gainStrengthExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n\n this.strength_exp += exp;\n\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier);\n}\nfunction gainDefenseExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n\n this.defense_exp += exp;\n\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier);\n}\nfunction gainDexterityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n\n this.dexterity_exp += exp;\n\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier);\n}\nfunction gainAgilityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n\n this.agility_exp += exp;\n\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier);\n}\nfunction gainCharismaExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n\n this.charisma_exp += exp;\n\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier);\n}\nfunction gainIntelligenceExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n }\n} //Given a string expression like \"str\" or \"strength\", returns the given stat\n\nfunction queryStatFromString(str) {\n const tempStr = str.toLowerCase();\n\n if (tempStr.includes(\"hack\")) {\n return this.hacking_skill;\n }\n\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n}\n/******* Working functions *******/\n\nfunction resetWorkStatus(generalType, group, workType) {\n if (generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType) return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n}\nfunction processWorkEarnings(numCycles = 1) {\n const focusBonus = this.focus ? 1 : 0.8;\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain);\n\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\n\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n/* Working for Company */\n\nfunction startWork(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction cancelationPenalty() {\n const specialIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][this.companyName];\n\n if (specialIp) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][specialIp];\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\nfunction work(numCycles) {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWork(false);\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__[/* influenceStockThroughCompanyWork */ \"a\"])(comp, this.workRepGainRate, numCycles);\n}\nfunction finishWork(cancelled, sing = false) {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n let content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (cancelled) {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a short shift of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"Since you cancelled your work early, you only gained half of the reputation you earned. \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n } else {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a full shift of 8 hours! \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n }\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked a short shift of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned $\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startWorkPartTime(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction workPartTime(numCycles) {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWorkPartTime();\n }\n}\nfunction finishWorkPartTime(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n const content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned a total of \" + \"$\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startFocusing() {\n this.focus = true;\n}\nfunction stopFocusing() {\n this.focus = false;\n}\n/* Working for Faction */\n\nfunction startFactionWork(faction) {\n //Update reputation gain rate to account for faction favor\n var favorMult = 1 + faction.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n}\nfunction startFactionHackWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking);\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = (this.hacking_skill + this.intelligence) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n this.startFactionWork(faction);\n}\nfunction startFactionFieldWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField);\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n this.startFactionWork(faction);\n}\nfunction startFactionSecurityWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity);\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n this.startFactionWork(faction);\n}\nfunction workForFaction(numCycles) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName]; //Constantly update the rep gain rate\n\n switch (this.factionWorkType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getHackingWorkRepGain */ \"c\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n break;\n\n default:\n break;\n } //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n\n\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles); //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n return this.finishFactionWork(false);\n }\n}\nfunction finishFactionWork(cancelled, sing = false) {\n var faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for your faction \", faction.name, \" for a total of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the faction \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for your faction \" + faction.name + \" for a total of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \". \" + \"You earned \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" rep, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //Money gained per game cycle\n\nfunction getWorkMoneyGain() {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n } // Get base salary\n\n\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney * bn11Mult;\n} //Hack exp gained per game cycle\n\nfunction getWorkHackExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work hack exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Str exp gained per game cycle\n\nfunction getWorkStrExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work str exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Def exp gained per game cycle\n\nfunction getWorkDefExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work def exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Dex exp gained per game cycle\n\nfunction getWorkDexExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work dex exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Agi exp gained per game cycle\n\nfunction getWorkAgiExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work agi exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Charisma exp gained per game cycle\n\nfunction getWorkChaExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work cha exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Reputation gained per game cycle\n\nfunction getWorkRepGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work rep gain will be 0`].join(\" \"));\n return 0;\n }\n\n var jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma); //Intelligence provides a flat bonus to job performance\n\n jobPerformance += this.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel; //Update reputation gain rate to account for company favor\n\n var favorMult = 1 + company.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return jobPerformance * this.company_rep_mult * favorMult;\n} // export function getFactionSecurityWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n// export function getFactionFieldWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\n\nfunction startCreateProgramWork(programName, time, reqLevel) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking_skill - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n\n this.createProgramReqLvl = reqLevel;\n this.timeNeededToCompleteWork = time; //Check for incomplete program\n\n for (var i = 0; i < this.getHomeComputer().programs.length; ++i) {\n var programFile = this.getHomeComputer().programs[i];\n\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n var res = programFile.split(\"-\");\n\n if (res.length != 3) {\n break;\n }\n\n var percComplete = Number(res[1].slice(0, -1));\n\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n\n this.timeWorkedCreateProgram = percComplete / 100 * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\nfunction createProgramWork(numCycles) {\n //Higher hacking skill will allow you to create programs faster\n var reqLvl = this.createProgramReqLvl;\n var skillMult = this.hacking_skill / reqLvl * this.getIntelligenceBonus(3); //This should always be greater than 1;\n\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n //Skill multiplier directly applied to \"time worked\"\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n }\n}\nfunction finishCreateProgramWork(cancelled) {\n var programName = this.createProgramName;\n\n if (cancelled === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You've finished creating \" + programName + \"!
\" + \"The new program can be found on your home computer.\");\n this.getHomeComputer().programs.push(programName);\n } else {\n var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000) / 100).toString();\n var incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp(this.createProgramReqLvl / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceProgramBaseExpGain);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n}\n/* Studying/Taking Classes */\n\nfunction startClass(costMult, expMult, className) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass;\n this.className = className;\n const gameCPS = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed; //Find cost and exp gain per game cycle\n\n var cost = 0;\n var hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = this.hashManager;\n\n switch (className) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience:\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructures:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworks:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithms:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagement:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadership:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymStrength:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n strExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDefense:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n defExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDexterity:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n dexExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymAgility:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n agiExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n}\nfunction takeClass(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles);\n} //The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\n\nfunction finishClass(sing = false) {\n this.gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"After \", this.className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \", \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"you spent a total of \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: -this.workMoneyGained\n }), \". \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"After \" + this.className + \" for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \", \" + \"you spent a total of \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained * -1) + \". \" + \"You earned a total of: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //The EXP and $ gains are hardcoded. Time is in ms\n\nfunction startCrime(crimeType, hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams = null) {\n this.crimeType = crimeType;\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime;\n\n if (singParams && singParams.workerscript) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = singParams.workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.timeNeededToCompleteWork = time;\n}\nfunction commitCrime(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n if (this.timeWorked >= this.timeNeededToCompleteWork) this.finishCrime(false);\n}\nfunction finishCrime(cancelled) {\n //Determine crime success/failure\n if (!cancelled) {\n if (Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__[/* determineCrimeSuccess */ \"a\"])(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n\n for (const i in _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"]) {\n if (_Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i].type == this.crimeType) {\n crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i];\n break;\n }\n }\n\n if (crime == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`);\n }\n\n this.gainMoney(this.workMoneyGained);\n this.recordMoneySource(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n } //On a crime success, gain 2x exp\n\n\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime successful! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime successful!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime failed! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime failed!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n} //Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\n\nfunction singularityStopWork() {\n if (!this.isWorking) {\n return \"\";\n }\n\n var res; //Earnings text for work\n\n switch (this.workType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n\n return res;\n} // Returns true if hospitalized, false otherwise\n\nfunction takeDamage(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp -= amt;\n\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\nfunction regenerateHp(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp += amt;\n\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\nfunction hospitalize() {\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__[/* getHospitalizationCost */ \"b\"])(this);\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_30__[/* Settings */ \"a\"].SuppressHospitalizationPopup === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged\\xA0\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\n\nfunction applyForJob(entryPosType, sing = false) {\n // Get current company and job\n let currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n }\n\n const currPositionName = this.jobs[this.companyName]; // Get company that's being applied to\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n if (sing) {\n return \"ERROR: Invalid company name: \" + this.location + \". applyToCompany() failed\";\n } else {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return;\n }\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, pos);\n\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position
\" + reqText);\n return;\n }\n\n while (true) {\n let newPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (newPos == null) {\n break;\n } //Check if this company has this position\n\n\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n\n pos = newPos;\n } else {\n break;\n }\n } //Check if the determined job is the same as the player's current job\n\n\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n var nextPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (nextPos == null) {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n } else if (company.hasPosition(nextPos)) {\n if (sing) {\n return false;\n }\n\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, nextPos);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n }\n\n return; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n this.companyName = this.location;\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n} //Returns your next position at a company given the field (software, business, etc.)\n\nfunction getNextCompanyPosition(company, entryPosType) {\n var currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n } //Not employed at this company, so return the entry position\n\n\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n } //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n\n\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][currentPositionName];\n\n if (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob() || currentPosition.isITJob() && entryPosType.isITJob() || currentPosition.isBusinessJob() && entryPosType.isBusinessJob() || currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob() || currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob() || currentPosition.isSecurityJob() && entryPosType.isSecurityJob() || currentPosition.isAgentJob() && entryPosType.isAgentJob() || currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob() || currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob() || currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob()) {\n return Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(currentPosition);\n }\n\n return entryPosType;\n}\nfunction quitJob(company) {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\nfunction applyForSoftwareJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareCompanyPositions */ \"j\"][0]], sing);\n}\nfunction applyForSoftwareConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]], sing);\n}\nfunction applyForItJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* ITCompanyPositions */ \"d\"][0]], sing);\n}\nfunction applyForSecurityEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForNetworkEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForBusinessJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessCompanyPositions */ \"b\"][0]], sing);\n}\nfunction applyForBusinessConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessConsultantCompanyPositions */ \"c\"][0]], sing);\n}\nfunction applyForSecurityJob(sing = false) {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityCompanyPositions */ \"h\"][2]], sing);\n}\nfunction applyForAgentJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1]])) {\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed part-time at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n} //Checks if the Player is qualified for a certain position\n\nfunction isQualified(company, position) {\n var offset = company.jobStatReqOffset;\n var reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n var reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n var reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && this.defense >= reqDefense && this.dexterity >= reqDexterity && this.agility >= reqAgility && this.charisma >= reqCharisma && company.playerReputation >= position.requiredReputation) {\n return true;\n }\n\n return false;\n}\n/********** Reapplying Augmentations and Source File ***********/\n\nfunction reapplyAllAugmentations(resetMultipliers = true) {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n var aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n\n aug.owned = true;\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n continue;\n }\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\nfunction reapplyAllSourceFiles() {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n var srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n var sourceFileObject = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n\n Object(_SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__[/* applySourceFile */ \"a\"])(this.sourceFiles[i]);\n }\n\n Object(_Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__[/* applyExploit */ \"a\"])();\n}\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\n\nfunction checkForFactionInvitations() {\n let invitedFactions = []; //Array which will hold all Factions the player should be invited to\n\n var numAugmentations = this.augmentations.length;\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs); // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n\n function getCompanyRep(companyName) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n } // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n\n\n function checkMegacorpRequirements(companyName, repNeeded = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CorpFactionRepRequirement) {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n } //Illuminati\n\n\n var illuminatiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Illuminati\"];\n\n if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && numAugmentations >= 30 && this.money.gte(150000000000) && this.hacking_skill >= 1500 && this.strength >= 1200 && this.defense >= 1200 && this.dexterity >= 1200 && this.agility >= 1200) {\n invitedFactions.push(illuminatiFac);\n } //Daedalus\n\n\n var daedalusFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Daedalus\"];\n\n if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && numAugmentations >= Math.round(30 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement) && this.money.gte(100000000000) && (this.hacking_skill >= 2500 || this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) {\n invitedFactions.push(daedalusFac);\n } //The Covenant\n\n\n var covenantFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Covenant\"];\n\n if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && numAugmentations >= 20 && this.money.gte(75000000000) && this.hacking_skill >= 850 && this.strength >= 850 && this.defense >= 850 && this.dexterity >= 850 && this.agility >= 850) {\n invitedFactions.push(covenantFac);\n } //ECorp\n\n\n var ecorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"ECorp\"];\n\n if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumECorp)) {\n invitedFactions.push(ecorpFac);\n } //MegaCorp\n\n\n var megacorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"MegaCorp\"];\n\n if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12MegaCorp)) {\n invitedFactions.push(megacorpFac);\n } //Bachman & Associates\n\n\n var bachmanandassociatesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Bachman & Associates\"];\n\n if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumBachmanAndAssociates)) {\n invitedFactions.push(bachmanandassociatesFac);\n } //Blade Industries\n\n\n var bladeindustriesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Blade Industries\"];\n\n if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12BladeIndustries)) {\n invitedFactions.push(bladeindustriesFac);\n } //NWO\n\n\n var nwoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NWO\"];\n\n if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenNWO)) {\n invitedFactions.push(nwoFac);\n } //Clarke Incorporated\n\n\n var clarkeincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Clarke Incorporated\"];\n\n if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumClarkeIncorporated)) {\n invitedFactions.push(clarkeincorporatedFac);\n } //OmniTek Incorporated\n\n\n var omnitekincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"OmniTek Incorporated\"];\n\n if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated)) {\n invitedFactions.push(omnitekincorporatedFac);\n } //Four Sigma\n\n\n var foursigmaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Four Sigma\"];\n\n if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12FourSigma)) {\n invitedFactions.push(foursigmaFac);\n } //KuaiGong International\n\n\n var kuaigonginternationalFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"KuaiGong International\"];\n\n if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational)) {\n invitedFactions.push(kuaigonginternationalFac);\n } //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n\n\n var fulcrumsecrettechonologiesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Fulcrum Secret Technologies\"];\n var fulcrumSecretServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].FulcrumSecretTechnologies]];\n\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (!fulcrumsecrettechonologiesFac.isBanned && !fulcrumsecrettechonologiesFac.isMember && !fulcrumsecrettechonologiesFac.alreadyInvited && fulcrumSecretServer.backdoorInstalled && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumFulcrumTechnologies, 250e3)) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n } //BitRunners\n\n\n var bitrunnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"BitRunners\"];\n var bitrunnersServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].BitRunnersServer]];\n\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.backdoorInstalled && !bitrunnersFac.alreadyInvited) {\n invitedFactions.push(bitrunnersFac);\n } //The Black Hand\n\n\n var theblackhandFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Black Hand\"];\n var blackhandServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].TheBlackHandServer]];\n\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.backdoorInstalled && !theblackhandFac.alreadyInvited) {\n invitedFactions.push(theblackhandFac);\n } //NiteSec\n\n\n var nitesecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NiteSec\"];\n var nitesecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].NiteSecServer]];\n\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.backdoorInstalled && !nitesecFac.alreadyInvited) {\n invitedFactions.push(nitesecFac);\n } //Chongqing\n\n\n var chongqingFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Chongqing\"];\n\n if (!chongqingFac.isBanned && !chongqingFac.isMember && !chongqingFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing) {\n invitedFactions.push(chongqingFac);\n } //Sector-12\n\n\n var sector12Fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Sector-12\"];\n\n if (!sector12Fac.isBanned && !sector12Fac.isMember && !sector12Fac.alreadyInvited && this.money.gte(15000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) {\n invitedFactions.push(sector12Fac);\n } //New Tokyo\n\n\n var newtokyoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"New Tokyo\"];\n\n if (!newtokyoFac.isBanned && !newtokyoFac.isMember && !newtokyoFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo) {\n invitedFactions.push(newtokyoFac);\n } //Aevum\n\n\n var aevumFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Aevum\"];\n\n if (!aevumFac.isBanned && !aevumFac.isMember && !aevumFac.alreadyInvited && this.money.gte(40000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum) {\n invitedFactions.push(aevumFac);\n } //Ishima\n\n\n var ishimaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Ishima\"];\n\n if (!ishimaFac.isBanned && !ishimaFac.isMember && !ishimaFac.alreadyInvited && this.money.gte(30000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) {\n invitedFactions.push(ishimaFac);\n } //Volhaven\n\n\n var volhavenFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Volhaven\"];\n\n if (!volhavenFac.isBanned && !volhavenFac.isMember && !volhavenFac.alreadyInvited && this.money.gte(50000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Volhaven) {\n invitedFactions.push(volhavenFac);\n } //Speakers for the Dead\n\n\n var speakersforthedeadFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Speakers for the Dead\"];\n\n if (!speakersforthedeadFac.isBanned && !speakersforthedeadFac.isMember && !speakersforthedeadFac.alreadyInvited && this.hacking_skill >= 100 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.numPeopleKilled >= 30 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(speakersforthedeadFac);\n } //The Dark Army\n\n\n var thedarkarmyFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Dark Army\"];\n\n if (!thedarkarmyFac.isBanned && !thedarkarmyFac.isMember && !thedarkarmyFac.alreadyInvited && this.hacking_skill >= 300 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing && this.numPeopleKilled >= 5 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thedarkarmyFac);\n } //The Syndicate\n\n\n var thesyndicateFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Syndicate\"];\n\n if (!thesyndicateFac.isBanned && !thesyndicateFac.isMember && !thesyndicateFac.alreadyInvited && this.hacking_skill >= 200 && this.strength >= 200 && this.defense >= 200 && this.dexterity >= 200 && this.agility >= 200 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) && this.money.gte(10000000) && this.karma <= -90 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thesyndicateFac);\n } //Silhouette\n\n\n var silhouetteFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Silhouette\"];\n\n if (!silhouetteFac.isBanned && !silhouetteFac.isMember && !silhouetteFac.alreadyInvited && (allPositions.includes(\"Chief Technology Officer\") || allPositions.includes(\"Chief Financial Officer\") || allPositions.includes(\"Chief Executive Officer\")) && this.money.gte(15000000) && this.karma <= -22) {\n invitedFactions.push(silhouetteFac);\n } //Tetrads\n\n\n var tetradsFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tetrads\"];\n\n if (!tetradsFac.isBanned && !tetradsFac.isMember && !tetradsFac.alreadyInvited && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) && this.strength >= 75 && this.defense >= 75 && this.dexterity >= 75 && this.agility >= 75 && this.karma <= -18) {\n invitedFactions.push(tetradsFac);\n } //SlumSnakes\n\n\n var slumsnakesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Slum Snakes\"];\n\n if (!slumsnakesFac.isBanned && !slumsnakesFac.isMember && !slumsnakesFac.alreadyInvited && this.strength >= 30 && this.defense >= 30 && this.dexterity >= 30 && this.agility >= 30 && this.karma <= -9 && this.money.gte(1000000)) {\n invitedFactions.push(slumsnakesFac);\n } //Netburners\n\n\n var netburnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Netburners\"];\n var totalHacknetRam = 0;\n var totalHacknetCores = 0;\n var totalHacknetLevels = 0;\n\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__[/* hasHacknetServers */ \"g\"])(this)) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][this.hacknetNodes[i]];\n\n if (hserver) {\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n }\n } else {\n totalHacknetLevels += this.hacknetNodes[i].level;\n totalHacknetRam += this.hacknetNodes[i].ram;\n totalHacknetCores += this.hacknetNodes[i].cores;\n }\n }\n\n if (!netburnersFac.isBanned && !netburnersFac.isMember && !netburnersFac.alreadyInvited && this.hacking_skill >= 80 && totalHacknetRam >= 8 && totalHacknetCores >= 4 && totalHacknetLevels >= 100) {\n invitedFactions.push(netburnersFac);\n } //Tian Di Hui\n\n\n var tiandihuiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tian Di Hui\"];\n\n if (!tiandihuiFac.isBanned && !tiandihuiFac.isMember && !tiandihuiFac.alreadyInvited && this.money.gte(1000000) && this.hacking_skill >= 50 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima)) {\n invitedFactions.push(tiandihuiFac);\n } //CyberSec\n\n\n var cybersecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"CyberSec\"];\n var cybersecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].CyberSecServer]];\n\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.backdoorInstalled && !cybersecFac.alreadyInvited) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n/************* BitNodes **************/\n\nfunction setBitNodeNumber(n) {\n this.bitNodeN = n;\n}\nfunction queueAugmentation(name) {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.firstAugPurchased = true;\n this.queuedAugmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](name));\n}\n/************* Coding Contracts **************/\n\nfunction gainCodingContractReward(reward, difficulty = 1) {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n /* eslint-disable no-case-declarations */\n\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n if (reward.name == null || !(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll:\n const totalGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty; // Ignore Bladeburners and other special factions for this calculation\n\n const specialFactions = [\"Bladeburners\"];\n var factions = this.factions.slice();\n factions = factions.filter(f => {\n return !specialFactions.includes(f);\n }); // If the player was only part of the special factions, we'll just give money\n\n if (factions.length == 0) {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n\n for (const facName of factions) {\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n continue;\n }\n\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName].playerReputation += gainPerFaction;\n }\n\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n if (reward.name == null || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseCompanyRepGain * difficulty;\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money:\n default:\n var moneyGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseMoneyGain * difficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney;\n this.gainMoney(moneyGain);\n this.recordMoneySource(moneyGain, \"codingcontract\");\n return `Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain)}`;\n break;\n }\n /* eslint-enable no-case-declarations */\n\n}\nfunction travel(to) {\n if (_Locations_Cities__WEBPACK_IMPORTED_MODULE_20__[/* Cities */ \"a\"][to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n\n this.city = to;\n return true;\n}\nfunction gotoLocation(to) {\n if (_Locations_Locations__WEBPACK_IMPORTED_MODULE_21__[/* Locations */ \"a\"][to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n\n this.location = to;\n return true;\n}\nfunction canAccessResleeving() {\n return this.bitNodeN === 10 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] > 0;\n}\nfunction giveExploit(exploit) {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n }\n}\nfunction getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n}\nfunction getCasinoWinnings() {\n return this.moneySourceA.casino;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"init\", function() { return init; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeAugmentation\", function() { return prestigeAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"prestigeSourceFile\", function() { return prestigeSourceFile; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"receiveInvite\", function() { return receiveInvite; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"calculateSkill\", function() { return calculateSkill; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"updateSkillLevels\", function() { return updateSkillLevels; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetMultipliers\", function() { return resetMultipliers; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hasProgram\", function() { return hasProgram; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setMoney\", function() { return setMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainMoney\", function() { return gainMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"loseMoney\", function() { return loseMoney; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAfford\", function() { return canAfford; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"recordMoneySource\", function() { return recordMoneySource; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainHackingExp\", function() { return gainHackingExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainStrengthExp\", function() { return gainStrengthExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDefenseExp\", function() { return gainDefenseExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainDexterityExp\", function() { return gainDexterityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainAgilityExp\", function() { return gainAgilityExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCharismaExp\", function() { return gainCharismaExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainIntelligenceExp\", function() { return gainIntelligenceExp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queryStatFromString\", function() { return queryStatFromString; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"resetWorkStatus\", function() { return resetWorkStatus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"processWorkEarnings\", function() { return processWorkEarnings; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWork\", function() { return startWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"cancelationPenalty\", function() { return cancelationPenalty; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"work\", function() { return work; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWork\", function() { return finishWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startWorkPartTime\", function() { return startWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workPartTime\", function() { return workPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishWorkPartTime\", function() { return finishWorkPartTime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFocusing\", function() { return startFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"stopFocusing\", function() { return stopFocusing; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionWork\", function() { return startFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionHackWork\", function() { return startFactionHackWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionFieldWork\", function() { return startFactionFieldWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startFactionSecurityWork\", function() { return startFactionSecurityWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"workForFaction\", function() { return workForFaction; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishFactionWork\", function() { return finishFactionWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkMoneyGain\", function() { return getWorkMoneyGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkHackExpGain\", function() { return getWorkHackExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkStrExpGain\", function() { return getWorkStrExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDefExpGain\", function() { return getWorkDefExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkDexExpGain\", function() { return getWorkDexExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkAgiExpGain\", function() { return getWorkAgiExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkChaExpGain\", function() { return getWorkChaExpGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getWorkRepGain\", function() { return getWorkRepGain; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCreateProgramWork\", function() { return startCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"createProgramWork\", function() { return createProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCreateProgramWork\", function() { return finishCreateProgramWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startClass\", function() { return startClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeClass\", function() { return takeClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishClass\", function() { return finishClass; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"startCrime\", function() { return startCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"commitCrime\", function() { return commitCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"finishCrime\", function() { return finishCrime; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"singularityStopWork\", function() { return singularityStopWork; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"takeDamage\", function() { return takeDamage; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"regenerateHp\", function() { return regenerateHp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"hospitalize\", function() { return hospitalize; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForJob\", function() { return applyForJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getNextCompanyPosition\", function() { return getNextCompanyPosition; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"quitJob\", function() { return quitJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareJob\", function() { return applyForSoftwareJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSoftwareConsultantJob\", function() { return applyForSoftwareConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForItJob\", function() { return applyForItJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityEngineerJob\", function() { return applyForSecurityEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForNetworkEngineerJob\", function() { return applyForNetworkEngineerJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessJob\", function() { return applyForBusinessJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForBusinessConsultantJob\", function() { return applyForBusinessConsultantJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForSecurityJob\", function() { return applyForSecurityJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForAgentJob\", function() { return applyForAgentJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForEmployeeJob\", function() { return applyForEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeEmployeeJob\", function() { return applyForPartTimeEmployeeJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForWaiterJob\", function() { return applyForWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"applyForPartTimeWaiterJob\", function() { return applyForPartTimeWaiterJob; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"isQualified\", function() { return isQualified; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllAugmentations\", function() { return reapplyAllAugmentations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"reapplyAllSourceFiles\", function() { return reapplyAllSourceFiles; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"checkForFactionInvitations\", function() { return checkForFactionInvitations; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"setBitNodeNumber\", function() { return setBitNodeNumber; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"queueAugmentation\", function() { return queueAugmentation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gainCodingContractReward\", function() { return gainCodingContractReward; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"travel\", function() { return travel; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"gotoLocation\", function() { return gotoLocation; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"canAccessResleeving\", function() { return canAccessResleeving; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"giveExploit\", function() { return giveExploit; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getIntelligenceBonus\", function() { return getIntelligenceBonus; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"getCasinoWinnings\", function() { return getCasinoWinnings; });\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/PlayerOwnedAugmentation */ 274);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Company/GetNextCompanyPosition */ 475);\n/* harmony import */ var _Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Company/GetJobRequirementText */ 396);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../Crime/CrimeHelpers */ 354);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Faction/Faction */ 135);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Gang/AllGangs */ 59);\n/* harmony import */ var _Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Hacknet/HacknetHelpers */ 46);\n/* harmony import */ var _Locations_Cities__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../Locations/Cities */ 105);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/Sleeve */ 246);\n/* harmony import */ var _formulas_skill__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../formulas/skill */ 199);\n/* harmony import */ var _formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../formulas/intelligence */ 312);\n/* harmony import */ var _formulas_reputation__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../formulas/reputation */ 188);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../SourceFile/applySourceFile */ 713);\n/* harmony import */ var _Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../Exploits/applyExploits */ 714);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 278);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../StockMarket/PlayerInfluencing */ 395);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../Hospital/Hospital */ 310);\n/* harmony import */ var decimal_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! decimal.js */ 77);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../utils/MoneySourceTracker */ 292);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_45___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_45__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction init() {\n /* Initialize Player's home computer */\n var t_homeComp = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_29__[/* safetlyCreateUniqueServer */ \"h\"])({\n adminRights: true,\n hostname: \"home\",\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* createUniqueRandomIp */ \"c\"])(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true\n });\n this.homeComputer = t_homeComp.ip;\n this.currentServer = t_homeComp.ip;\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AddToAllServers */ \"a\"])(t_homeComp);\n this.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_13__[/* Programs */ \"a\"].NukeProgram.name);\n}\nfunction prestigeAugmentation() {\n var homeComp = this.getHomeComputer();\n this.currentServer = homeComp.ip;\n this.homeComputer = homeComp.ip;\n this.numPeopleKilled = 0;\n this.karma = 0; //Reset stats\n\n this.hacking_skill = 1;\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n this.charisma = 1;\n this.hacking_exp = 0;\n this.strength_exp = 0;\n this.defense_exp = 0;\n this.dexterity_exp = 0;\n this.agility_exp = 0;\n this.charisma_exp = 0;\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](1000);\n this.city = _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12;\n this.location = \"\";\n this.companyName = \"\";\n this.jobs = {};\n this.purchasedServers = [];\n this.factions = [];\n this.factionInvitations = [];\n this.queuedAugmentations = [];\n this.resleeves = [];\n let numSleeves = Math.min(3, _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n if (this.sleeves[i].shock >= 100) {\n this.sleeves[i].synchronize(this);\n } else {\n this.sleeves[i].shockRecovery(this);\n }\n }\n }\n\n this.isWorking = false;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n this.crimeType = \"\";\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.lastUpdate = new Date().getTime(); // Statistics Trackers\n\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n this.hacknetNodes.length = 0;\n this.hashManager.prestige(); // Reapply augs, re-calculate skills and reset HP\n\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\nfunction prestigeSourceFile() {\n this.prestigeAugmentation(); // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"]) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new _PersonObjects_Sleeve_Sleeve__WEBPACK_IMPORTED_MODULE_24__[/* Sleeve */ \"a\"](this);\n }\n }\n\n if (this.bitNodeN === 10) {\n for (let i = 0; i < this.sleeves.length; i++) {\n this.sleeves[i].shock = Math.max(25, this.sleeves[i].shock);\n this.sleeves[i].sync = Math.max(25, this.sleeves[i].sync);\n }\n }\n\n this.timeWorked = 0; // Gang\n\n this.gang = null;\n Object(_Gang_AllGangs__WEBPACK_IMPORTED_MODULE_18__[/* resetGangs */ \"c\"])(); // Reset Stock market\n\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false; // BitNode 3: Corporatocracy\n\n this.corporation = 0;\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\nfunction receiveInvite(factionName) {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n\n this.firstFacInvRecvd = true;\n this.factionInvitations.push(factionName);\n} //Calculates skill level based on experience. The same formula will be used for every skill\n\nfunction calculateSkill(exp, mult = 1) {\n return Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(exp, mult);\n}\nfunction updateSkillLevels() {\n this.hacking_skill = Math.max(1, Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier)));\n this.strength = Math.max(1, Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier)));\n this.defense = Math.max(1, Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier)));\n this.dexterity = Math.max(1, Math.floor(this.calculateSkill(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier)));\n this.agility = Math.max(1, Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier)));\n this.charisma = Math.max(1, Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier)));\n\n if (this.intelligence > 0) {\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n } else {\n this.intelligence = 0;\n }\n\n var ratio = this.hp / this.max_hp;\n this.max_hp = Math.floor(10 + this.defense / 10);\n this.hp = Math.round(this.max_hp * ratio);\n}\nfunction resetMultipliers() {\n this.hacking_chance_mult = 1;\n this.hacking_speed_mult = 1;\n this.hacking_money_mult = 1;\n this.hacking_grow_mult = 1;\n this.hacking_mult = 1;\n this.strength_mult = 1;\n this.defense_mult = 1;\n this.dexterity_mult = 1;\n this.agility_mult = 1;\n this.charisma_mult = 1;\n this.hacking_exp_mult = 1;\n this.strength_exp_mult = 1;\n this.defense_exp_mult = 1;\n this.dexterity_exp_mult = 1;\n this.agility_exp_mult = 1;\n this.charisma_exp_mult = 1;\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n this.hacknet_node_money_mult = 1;\n this.hacknet_node_purchase_cost_mult = 1;\n this.hacknet_node_ram_cost_mult = 1;\n this.hacknet_node_core_cost_mult = 1;\n this.hacknet_node_level_cost_mult = 1;\n this.work_money_mult = 1;\n this.bladeburner_max_stamina_mult = 1;\n this.bladeburner_stamina_gain_mult = 1;\n this.bladeburner_analysis_mult = 1;\n this.bladeburner_success_chance_mult = 1;\n}\nfunction hasProgram(programName) {\n const home = this.getHomeComputer();\n\n if (home == null) {\n return false;\n }\n\n for (var i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n\n return false;\n}\nfunction setMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n\n this.money = new decimal_js__WEBPACK_IMPORTED_MODULE_38__[/* default */ \"a\"](money);\n}\nfunction gainMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money.plus(money);\n}\nfunction loseMoney(money) {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n\n if (this.money.eq(Infinity) && money === Infinity) return;\n this.money = this.money.minus(money);\n}\nfunction canAfford(cost) {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n\n return this.money.gte(cost);\n}\nfunction recordMoneySource(amt, source) {\n if (!(this.moneySourceA instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n if (!(this.moneySourceB instanceof _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"])) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new _utils_MoneySourceTracker__WEBPACK_IMPORTED_MODULE_40__[/* MoneySourceTracker */ \"a\"]();\n }\n\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\nfunction gainHackingExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n\n this.hacking_exp += exp;\n\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking_skill = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.hacking_exp, this.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier);\n}\nfunction gainStrengthExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n\n this.strength_exp += exp;\n\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.strength_exp, this.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier);\n}\nfunction gainDefenseExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n\n this.defense_exp += exp;\n\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.defense_exp, this.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier);\n}\nfunction gainDexterityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n\n this.dexterity_exp += exp;\n\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.dexterity_exp, this.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier);\n}\nfunction gainAgilityExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n\n this.agility_exp += exp;\n\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.agility_exp, this.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier);\n}\nfunction gainCharismaExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n\n this.charisma_exp += exp;\n\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = Object(_formulas_skill__WEBPACK_IMPORTED_MODULE_25__[/* calculateSkill */ \"b\"])(this.charisma_exp, this.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier);\n}\nfunction gainIntelligenceExp(exp) {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n }\n} //Given a string expression like \"str\" or \"strength\", returns the given stat\n\nfunction queryStatFromString(str) {\n const tempStr = str.toLowerCase();\n\n if (tempStr.includes(\"hack\")) {\n return this.hacking_skill;\n }\n\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n}\n/******* Working functions *******/\n\nfunction resetWorkStatus(generalType, group, workType) {\n if (generalType === this.workType && group === this.companyName) return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType) return;\n if (this.isWorking) this.singularityStopWork();\n this.workHackExpGainRate = 0;\n this.workStrExpGainRate = 0;\n this.workDefExpGainRate = 0;\n this.workDexExpGainRate = 0;\n this.workAgiExpGainRate = 0;\n this.workChaExpGainRate = 0;\n this.workRepGainRate = 0;\n this.workMoneyGainRate = 0;\n this.workMoneyLossRate = 0;\n this.workHackExpGained = 0;\n this.workStrExpGained = 0;\n this.workDefExpGained = 0;\n this.workDexExpGained = 0;\n this.workAgiExpGained = 0;\n this.workChaExpGained = 0;\n this.workRepGained = 0;\n this.workMoneyGained = 0;\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.className = \"\";\n}\nfunction processWorkEarnings(numCycles = 1) {\n const focusBonus = this.focus ? 1 : 0.8;\n const hackExpGain = focusBonus * this.workHackExpGainRate * numCycles;\n const strExpGain = focusBonus * this.workStrExpGainRate * numCycles;\n const defExpGain = focusBonus * this.workDefExpGainRate * numCycles;\n const dexExpGain = focusBonus * this.workDexExpGainRate * numCycles;\n const agiExpGain = focusBonus * this.workAgiExpGainRate * numCycles;\n const chaExpGain = focusBonus * this.workChaExpGainRate * numCycles;\n const moneyGain = (this.workMoneyGainRate - this.workMoneyLossRate) * numCycles;\n this.gainHackingExp(hackExpGain);\n this.gainStrengthExp(strExpGain);\n this.gainDefenseExp(defExpGain);\n this.gainDexterityExp(dexExpGain);\n this.gainAgilityExp(agiExpGain);\n this.gainCharismaExp(chaExpGain);\n this.gainMoney(moneyGain);\n\n if (this.className) {\n this.recordMoneySource(moneyGain, \"class\");\n } else {\n this.recordMoneySource(moneyGain, \"work\");\n }\n\n this.workHackExpGained += hackExpGain;\n this.workStrExpGained += strExpGain;\n this.workDefExpGained += defExpGain;\n this.workDexExpGained += dexExpGain;\n this.workAgiExpGained += agiExpGain;\n this.workChaExpGained += chaExpGain;\n this.workRepGained += focusBonus * this.workRepGainRate * numCycles;\n this.workMoneyGained += focusBonus * this.workMoneyGainRate * numCycles;\n this.workMoneyGained -= focusBonus * this.workMoneyLossRate * numCycles;\n}\n/* Working for Company */\n\nfunction startWork(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction cancelationPenalty() {\n const specialIp = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][this.companyName];\n\n if (specialIp) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][specialIp];\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\nfunction work(numCycles) {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n Object(_StockMarket_PlayerInfluencing__WEBPACK_IMPORTED_MODULE_36__[/* influenceStockThroughCompanyWork */ \"a\"])(comp, this.workRepGainRate, numCycles); // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishWork(cancelled, sing = false) {\n //Since the work was cancelled early, player only gains half of what they've earned so far\n if (cancelled) {\n this.workRepGained *= this.cancelationPenalty();\n }\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n let content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (cancelled) {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a short shift of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"Since you cancelled your work early, you only gained half of the reputation you earned. \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n } else {\n content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked a full shift of 8 hours! \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), content);\n }\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked a short shift of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned $\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startWorkPartTime(companyName) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.focus = true;\n this.companyName = companyName;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime;\n this.workHackExpGainRate = this.getWorkHackExpGain();\n this.workStrExpGainRate = this.getWorkStrExpGain();\n this.workDefExpGainRate = this.getWorkDefExpGain();\n this.workDexExpGainRate = this.getWorkDexExpGain();\n this.workAgiExpGainRate = this.getWorkAgiExpGain();\n this.workChaExpGainRate = this.getWorkChaExpGain();\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours;\n}\nfunction workPartTime(numCycles) {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles); //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer8Hours) {\n return this.finishWorkPartTime();\n return true;\n }\n\n return false;\n}\nfunction finishWorkPartTime(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n company.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n const content = react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the company \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null));\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(content);\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \" and \" + \"earned a total of \" + \"$\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" reputation, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n}\nfunction startFocusing() {\n this.focus = true;\n}\nfunction stopFocusing() {\n this.focus = false;\n}\n/* Working for Faction */\n\nfunction startFactionWork(faction) {\n //Update reputation gain rate to account for faction favor\n var favorMult = 1 + faction.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain;\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n this.timeNeededToCompleteWork = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours;\n}\nfunction startFactionHackWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking);\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = (this.hacking_skill + this.intelligence) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel * this.faction_rep_mult * this.getIntelligenceBonus(0.5);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n this.startFactionWork(faction);\n}\nfunction startFactionFieldWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField);\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n this.startFactionWork(faction);\n}\nfunction startFactionSecurityWork(faction) {\n this.resetWorkStatus(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction, faction.name, _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity);\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].FactionWorkExpGain;\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n this.factionWorkType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n this.startFactionWork(faction);\n}\nfunction workForFaction(numCycles) {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName]; //Constantly update the rep gain rate\n\n switch (this.factionWorkType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkHacking:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getHackingWorkRepGain */ \"c\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkField:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionFieldWorkRepGain */ \"a\"])(this, faction);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].FactionWorkSecurity:\n this.workRepGainRate = Object(_formulas_reputation__WEBPACK_IMPORTED_MODULE_27__[/* getFactionSecurityWorkRepGain */ \"b\"])(this, faction);\n break;\n\n default:\n break;\n } //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n\n\n var overMax = false;\n\n if (this.timeWorked + _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours - this.timeWorked) / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed);\n }\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles); //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n\n if (overMax || this.timeWorked >= _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishFactionWork(cancelled, sing = false) {\n var faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You worked for your faction \", faction.name, \" for a total of \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \" \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_43__[/* Reputation */ \"a\"])(this.workRepGained), \" reputation for the faction \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"You worked for your faction \" + faction.name + \" for a total of \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \". \" + \"You earned \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatReputation(this.workRepGained) + \" rep, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //Money gained per game cycle\n\nfunction getWorkMoneyGain() {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n } // Get base salary\n\n\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (companyPosition == null) {\n console.error(`Could not find CompanyPosition object for ${companyPositionName}. Work salary will be 0`);\n return 0;\n }\n\n return companyPosition.baseSalary * company.salaryMultiplier * this.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney * bn11Mult;\n} //Hack exp gained per game cycle\n\nfunction getWorkHackExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work hack exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.hackingExpGain * company.expMultiplier * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Str exp gained per game cycle\n\nfunction getWorkStrExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work str exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.strengthExpGain * company.expMultiplier * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Def exp gained per game cycle\n\nfunction getWorkDefExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work def exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.defenseExpGain * company.expMultiplier * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Dex exp gained per game cycle\n\nfunction getWorkDexExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work dex exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.dexterityExpGain * company.expMultiplier * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Agi exp gained per game cycle\n\nfunction getWorkAgiExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work agi exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.agilityExpGain * company.expMultiplier * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Charisma exp gained per game cycle\n\nfunction getWorkChaExpGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work cha exp gain will be 0`].join(\" \"));\n return 0;\n }\n\n return companyPosition.charismaExpGain * company.expMultiplier * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CompanyWorkExpGain;\n} //Reputation gained per game cycle\n\nfunction getWorkRepGain() {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][companyPositionName];\n\n if (company == null || companyPosition == null) {\n console.error([`Could not find Company object for ${this.companyName}`, `or CompanyPosition object for ${companyPositionName}.`, `Work rep gain will be 0`].join(\" \"));\n return 0;\n }\n\n var jobPerformance = companyPosition.calculateJobPerformance(this.hacking_skill, this.strength, this.defense, this.dexterity, this.agility, this.charisma); //Intelligence provides a flat bonus to job performance\n\n jobPerformance += this.intelligence / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].MaxSkillLevel; //Update reputation gain rate to account for company favor\n\n var favorMult = 1 + company.favor / 100;\n\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n\n return jobPerformance * this.company_rep_mult * favorMult;\n} // export function getFactionSecurityWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel) / 4.5;\n// return t * this.faction_rep_mult;\n// }\n// export function getFactionFieldWorkRepGain() {\n// var t = 0.9 * (this.hacking_skill / CONSTANTS.MaxSkillLevel +\n// this.strength / CONSTANTS.MaxSkillLevel +\n// this.defense / CONSTANTS.MaxSkillLevel +\n// this.dexterity / CONSTANTS.MaxSkillLevel +\n// this.agility / CONSTANTS.MaxSkillLevel +\n// this.charisma / CONSTANTS.MaxSkillLevel +\n// this.intelligence / CONSTANTS.MaxSkillLevel) / 5.5;\n// return t * this.faction_rep_mult;\n// }\n\n/* Creating a Program */\n\nfunction startCreateProgramWork(programName, time, reqLevel) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram; //Time needed to complete work affected by hacking skill (linearly based on\n //ratio of (your skill - required level) to MAX skill)\n //var timeMultiplier = (CONSTANTS.MaxSkillLevel - (this.hacking_skill - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n\n this.createProgramReqLvl = reqLevel;\n this.timeNeededToCompleteWork = time; //Check for incomplete program\n\n for (var i = 0; i < this.getHomeComputer().programs.length; ++i) {\n var programFile = this.getHomeComputer().programs[i];\n\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n var res = programFile.split(\"-\");\n\n if (res.length != 3) {\n break;\n }\n\n var percComplete = Number(res[1].slice(0, -1));\n\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n\n this.timeWorkedCreateProgram = percComplete / 100 * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\nfunction createProgramWork(numCycles) {\n //Higher hacking skill will allow you to create programs faster\n var reqLvl = this.createProgramReqLvl;\n var skillMult = this.hacking_skill / reqLvl * this.getIntelligenceBonus(3); //This should always be greater than 1;\n\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n //Skill multiplier directly applied to \"time worked\"\n\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n\n return false;\n}\nfunction finishCreateProgramWork(cancelled) {\n var programName = this.createProgramName;\n\n if (cancelled === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You've finished creating \" + programName + \"!
\" + \"The new program can be found on your home computer.\");\n this.getHomeComputer().programs.push(programName);\n } else {\n var perc = (Math.floor(this.timeWorkedCreateProgram / this.timeNeededToCompleteWork * 10000) / 100).toString();\n var incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp(this.createProgramReqLvl / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceProgramBaseExpGain);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n}\n/* Studying/Taking Classes */\n\nfunction startClass(costMult, expMult, className) {\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass;\n this.className = className;\n const gameCPS = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed; //Find cost and exp gain per game cycle\n\n var cost = 0;\n var hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = this.hashManager;\n\n switch (className) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience:\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassStudyComputerScienceBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructures:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworks:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassNetworksBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithms:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult / gameCPS;\n hackExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagement:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassManagementBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadership:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult / gameCPS;\n chaExp = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseExp * expMult / gameCPS * hashManager.getStudyMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymStrength:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n strExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDefense:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n defExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymDexterity:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n dexExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymAgility:\n cost = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * costMult / gameCPS;\n agiExp = expMult / gameCPS * hashManager.getTrainingMult();\n break;\n\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n return;\n }\n\n this.workMoneyLossRate = cost;\n this.workHackExpGainRate = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workStrExpGainRate = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDefExpGainRate = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workDexExpGainRate = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workAgiExpGainRate = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n this.workChaExpGainRate = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].ClassGymExpGain;\n}\nfunction takeClass(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n this.processWorkEarnings(numCycles);\n return false;\n} //The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\n\nfunction finishClass(sing = false) {\n this.gainIntelligenceExp(_Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].IntelligenceClassBaseExpGain * Math.round(this.timeWorked / 1000));\n\n if (this.workMoneyGained > 0) {\n throw new Error(\"ERR: Somehow gained money while taking class\");\n }\n\n this.updateSkillLevels();\n\n if (!sing) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"After \", this.className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked), \", \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"you spent a total of \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: -this.workMoneyGained\n }), \". \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You earned a total of: \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility exp \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma exp\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null)));\n }\n\n this.isWorking = false;\n\n if (sing) {\n var res = \"After \" + this.className + \" for \" + Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_42__[/* convertTimeMsToTimeElapsedString */ \"b\"])(this.timeWorked) + \", \" + \"you spent a total of \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained * -1) + \". \" + \"You earned a total of: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hacking exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" strength exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" defense exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dexterity exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agility exp, and \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n\n this.resetWorkStatus();\n} //The EXP and $ gains are hardcoded. Time is in ms\n\nfunction startCrime(crimeType, hackExp, strExp, defExp, dexExp, agiExp, chaExp, money, time, singParams = null) {\n this.crimeType = crimeType;\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime;\n\n if (singParams && singParams.workerscript) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = singParams.workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CrimeMoney;\n this.timeNeededToCompleteWork = time;\n}\nfunction commitCrime(numCycles) {\n this.timeWorked += _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"]._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n\n return false;\n}\nfunction finishCrime(cancelled) {\n //Determine crime success/failure\n if (!cancelled) {\n if (Object(_Crime_CrimeHelpers__WEBPACK_IMPORTED_MODULE_14__[/* determineCrimeSuccess */ \"a\"])(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n\n for (const i in _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"]) {\n if (_Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i].type == this.crimeType) {\n crime = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_15__[/* Crimes */ \"a\"][i];\n break;\n }\n }\n\n if (crime == null) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`);\n }\n\n this.gainMoney(this.workMoneyGained);\n this.recordMoneySource(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n } //On a crime success, gain 2x exp\n\n\n this.workHackExpGained *= 2;\n this.workStrExpGained *= 2;\n this.workDefExpGained *= 2;\n this.workDexExpGained *= 2;\n this.workAgiExpGained *= 2;\n this.workChaExpGained *= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime successful! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(this.workMoneyGained) + \", \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime successful!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: this.workMoneyGained\n }), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n } else {\n //Exp halved on failure\n this.workHackExpGained /= 2;\n this.workStrExpGained /= 2;\n this.workDefExpGained /= 2;\n this.workDexExpGained /= 2;\n this.workAgiExpGained /= 2;\n this.workChaExpGained /= 2;\n\n if (this.committingCrimeThruSingFn) {\n if (this.singFnCrimeWorkerScript.disableLogs.ALL == null && this.singFnCrimeWorkerScript.disableLogs.commitCrime == null) {\n this.singFnCrimeWorkerScript.scriptRef.log(\"Crime failed! Gained \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained) + \" hack exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained) + \" str exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained) + \" def exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained) + \" dex exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained) + \" agi exp, \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained) + \" cha exp.\");\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"Crime failed!\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), \"You gained:\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workHackExpGained), \" hacking experience \", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workStrExpGained), \" strength experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDefExpGained), \" defense experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workDexExpGained), \" dexterity experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workAgiExpGained), \" agility experience\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(\"br\", null), _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatExp(this.workChaExpGained), \" charisma experience\"));\n }\n }\n\n this.gainHackingExp(this.workHackExpGained);\n this.gainStrengthExp(this.workStrExpGained);\n this.gainDefenseExp(this.workDefExpGained);\n this.gainDexterityExp(this.workDexExpGained);\n this.gainAgilityExp(this.workAgiExpGained);\n this.gainCharismaExp(this.workChaExpGained);\n }\n\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n} //Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\n\nfunction singularityStopWork() {\n if (!this.isWorking) {\n return \"\";\n }\n\n var res; //Earnings text for work\n\n switch (this.workType) {\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n\n case _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n\n return res;\n} // Returns true if hospitalized, false otherwise\n\nfunction takeDamage(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp -= amt;\n\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\nfunction regenerateHp(amt) {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n\n this.hp += amt;\n\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\nfunction hospitalize() {\n const cost = Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_37__[/* getHospitalizationCost */ \"b\"])(this);\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_30__[/* Settings */ \"a\"].SuppressHospitalizationPopup === false) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_45___default.a.Fragment, null, \"You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged\\xA0\", react__WEBPACK_IMPORTED_MODULE_45___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_44__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n this.loseMoney(cost);\n this.recordMoneySource(-1 * cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\n/********* Company job application **********/\n//Determines the job that the Player should get (if any) at the current company\n//The 'sing' argument designates whether or not this is being called from\n//the applyToCompany() Netscript Singularity function\n\nfunction applyForJob(entryPosType, sing = false) {\n // Get current company and job\n let currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n }\n\n const currPositionName = this.jobs[this.companyName]; // Get company that's being applied to\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (!(company instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n if (sing) {\n return \"ERROR: Invalid company name: \" + this.location + \". applyToCompany() failed\";\n } else {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return;\n }\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, pos);\n\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position
\" + reqText);\n return;\n }\n\n while (true) {\n let newPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (newPos == null) {\n break;\n } //Check if this company has this position\n\n\n if (company.hasPosition(newPos)) {\n if (!this.isQualified(company, newPos)) {\n //If player not qualified for next job, break loop so player will be given current job\n break;\n }\n\n pos = newPos;\n } else {\n break;\n }\n } //Check if the determined job is the same as the player's current job\n\n\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n var nextPos = Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(pos);\n\n if (nextPos == null) {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n } else if (company.hasPosition(nextPos)) {\n if (sing) {\n return false;\n }\n\n var reqText = Object(_Company_GetJobRequirementText__WEBPACK_IMPORTED_MODULE_9__[/* getJobRequirementText */ \"a\"])(company, nextPos);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"You are already at the highest position for your field! No promotion available\");\n }\n\n return; //Same job, do nothing\n }\n }\n\n this.jobs[company.name] = pos.name;\n this.companyName = this.location;\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n} //Returns your next position at a company given the field (software, business, etc.)\n\nfunction getNextCompanyPosition(company, entryPosType) {\n var currCompany = null;\n\n if (this.companyName !== \"\") {\n currCompany = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.companyName];\n } //Not employed at this company, so return the entry position\n\n\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n } //If the entry pos type and the player's current position have the same type,\n //return the player's \"nextCompanyPosition\". Otherwise return the entryposType\n //Employed at this company, so just return the next position if it exists.\n\n\n const currentPositionName = this.jobs[this.companyName];\n const currentPosition = _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][currentPositionName];\n\n if (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob() || currentPosition.isITJob() && entryPosType.isITJob() || currentPosition.isBusinessJob() && entryPosType.isBusinessJob() || currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob() || currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob() || currentPosition.isSecurityJob() && entryPosType.isSecurityJob() || currentPosition.isAgentJob() && entryPosType.isAgentJob() || currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob() || currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob() || currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob()) {\n return Object(_Company_GetNextCompanyPosition__WEBPACK_IMPORTED_MODULE_8__[/* getNextCompanyPositionHelper */ \"a\"])(currentPosition);\n }\n\n return entryPosType;\n}\nfunction quitJob(company) {\n this.isWorking = false;\n this.companyName = \"\";\n delete this.jobs[company];\n}\nfunction applyForSoftwareJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareCompanyPositions */ \"j\"][0]], sing);\n}\nfunction applyForSoftwareConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]], sing);\n}\nfunction applyForItJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* ITCompanyPositions */ \"d\"][0]], sing);\n}\nfunction applyForSecurityEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityEngineerCompanyPositions */ \"i\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForNetworkEngineerJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* NetworkEngineerCompanyPositions */ \"f\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForBusinessJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessCompanyPositions */ \"b\"][0]], sing);\n}\nfunction applyForBusinessConsultantJob(sing = false) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* BusinessConsultantCompanyPositions */ \"c\"][0]], sing);\n}\nfunction applyForSecurityJob(sing = false) {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* SecurityCompanyPositions */ \"h\"][2]], sing);\n}\nfunction applyForAgentJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]])) {\n return this.applyForJob(_Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* AgentCompanyPositions */ \"a\"][0]], sing);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeEmployeeJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1]])) {\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][1];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed part-time at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* MiscCompanyPositions */ \"e\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n}\nfunction applyForPartTimeWaiterJob(sing = false) {\n var company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][this.location]; //Company being applied to\n\n if (this.isQualified(company, _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_10__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0]])) {\n this.companyName = company.name;\n this.jobs[company.name] = _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_11__[/* PartTimeCompanyPositions */ \"g\"][0];\n\n if (sing) {\n return true;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Congratulations, you are now employed as a part-time waiter at \" + this.companyName);\n } else {\n if (sing) {\n return false;\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_41__[/* dialogBoxCreate */ \"a\"])(\"Unforunately, you do not qualify for this position\");\n }\n} //Checks if the Player is qualified for a certain position\n\nfunction isQualified(company, position) {\n var offset = company.jobStatReqOffset;\n var reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n var reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n var reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n var reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n var reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n if (this.hacking_skill >= reqHacking && this.strength >= reqStrength && this.defense >= reqDefense && this.dexterity >= reqDexterity && this.agility >= reqAgility && this.charisma >= reqCharisma && company.playerReputation >= position.requiredReputation) {\n return true;\n }\n\n return false;\n}\n/********** Reapplying Augmentations and Source File ***********/\n\nfunction reapplyAllAugmentations(resetMultipliers = true) {\n if (resetMultipliers) {\n this.resetMultipliers();\n }\n\n for (let i = 0; i < this.augmentations.length; ++i) {\n //Compatibility with new version\n if (this.augmentations[i].name === \"HacknetNode NIC Architecture Neural-Upload\") {\n this.augmentations[i].name = \"Hacknet Node NIC Architecture Neural-Upload\";\n }\n\n const augName = this.augmentations[i].name;\n var aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_0__[/* Augmentations */ \"a\"][augName];\n\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n\n aug.owned = true;\n\n if (aug.name == _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n for (let j = 0; j < aug.level; ++j) {\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n continue;\n }\n\n Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_1__[/* applyAugmentation */ \"a\"])(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\nfunction reapplyAllSourceFiles() {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n var srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n var sourceFileObject = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_34__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n\n Object(_SourceFile_applySourceFile__WEBPACK_IMPORTED_MODULE_32__[/* applySourceFile */ \"a\"])(this.sourceFiles[i]);\n }\n\n Object(_Exploits_applyExploits__WEBPACK_IMPORTED_MODULE_33__[/* applyExploit */ \"a\"])();\n}\n/*************** Check for Faction Invitations *************/\n//This function sets the requirements to join a Faction. It checks whether the Player meets\n//those requirements and will return an array of all factions that the Player should\n//receive an invitation to\n\nfunction checkForFactionInvitations() {\n let invitedFactions = []; //Array which will hold all Factions the player should be invited to\n\n var numAugmentations = this.augmentations.length;\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs); // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n\n function getCompanyRep(companyName) {\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][companyName];\n\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n } // Helper function that returns a boolean indicating whether the Player meets\n // the requirements for the specified company. There are two requirements:\n // 1. High enough reputation\n // 2. Player is employed at the company\n\n\n function checkMegacorpRequirements(companyName, repNeeded = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CorpFactionRepRequirement) {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n } //Illuminati\n\n\n var illuminatiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Illuminati\"];\n\n if (!illuminatiFac.isBanned && !illuminatiFac.isMember && !illuminatiFac.alreadyInvited && numAugmentations >= 30 && this.money.gte(150000000000) && this.hacking_skill >= 1500 && this.strength >= 1200 && this.defense >= 1200 && this.dexterity >= 1200 && this.agility >= 1200) {\n invitedFactions.push(illuminatiFac);\n } //Daedalus\n\n\n var daedalusFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Daedalus\"];\n\n if (!daedalusFac.isBanned && !daedalusFac.isMember && !daedalusFac.alreadyInvited && numAugmentations >= Math.round(30 * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].DaedalusAugsRequirement) && this.money.gte(100000000000) && (this.hacking_skill >= 2500 || this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500)) {\n invitedFactions.push(daedalusFac);\n } //The Covenant\n\n\n var covenantFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Covenant\"];\n\n if (!covenantFac.isBanned && !covenantFac.isMember && !covenantFac.alreadyInvited && numAugmentations >= 20 && this.money.gte(75000000000) && this.hacking_skill >= 850 && this.strength >= 850 && this.defense >= 850 && this.dexterity >= 850 && this.agility >= 850) {\n invitedFactions.push(covenantFac);\n } //ECorp\n\n\n var ecorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"ECorp\"];\n\n if (!ecorpFac.isBanned && !ecorpFac.isMember && !ecorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumECorp)) {\n invitedFactions.push(ecorpFac);\n } //MegaCorp\n\n\n var megacorpFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"MegaCorp\"];\n\n if (!megacorpFac.isBanned && !megacorpFac.isMember && !megacorpFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12MegaCorp)) {\n invitedFactions.push(megacorpFac);\n } //Bachman & Associates\n\n\n var bachmanandassociatesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Bachman & Associates\"];\n\n if (!bachmanandassociatesFac.isBanned && !bachmanandassociatesFac.isMember && !bachmanandassociatesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumBachmanAndAssociates)) {\n invitedFactions.push(bachmanandassociatesFac);\n } //Blade Industries\n\n\n var bladeindustriesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Blade Industries\"];\n\n if (!bladeindustriesFac.isBanned && !bladeindustriesFac.isMember && !bladeindustriesFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12BladeIndustries)) {\n invitedFactions.push(bladeindustriesFac);\n } //NWO\n\n\n var nwoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NWO\"];\n\n if (!nwoFac.isBanned && !nwoFac.isMember && !nwoFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenNWO)) {\n invitedFactions.push(nwoFac);\n } //Clarke Incorporated\n\n\n var clarkeincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Clarke Incorporated\"];\n\n if (!clarkeincorporatedFac.isBanned && !clarkeincorporatedFac.isMember && !clarkeincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumClarkeIncorporated)) {\n invitedFactions.push(clarkeincorporatedFac);\n } //OmniTek Incorporated\n\n\n var omnitekincorporatedFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"OmniTek Incorporated\"];\n\n if (!omnitekincorporatedFac.isBanned && !omnitekincorporatedFac.isMember && !omnitekincorporatedFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].VolhavenOmniTekIncorporated)) {\n invitedFactions.push(omnitekincorporatedFac);\n } //Four Sigma\n\n\n var foursigmaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Four Sigma\"];\n\n if (!foursigmaFac.isBanned && !foursigmaFac.isMember && !foursigmaFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12FourSigma)) {\n invitedFactions.push(foursigmaFac);\n } //KuaiGong International\n\n\n var kuaigonginternationalFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"KuaiGong International\"];\n\n if (!kuaigonginternationalFac.isBanned && !kuaigonginternationalFac.isMember && !kuaigonginternationalFac.alreadyInvited && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].ChongqingKuaiGongInternational)) {\n invitedFactions.push(kuaigonginternationalFac);\n } //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n\n\n var fulcrumsecrettechonologiesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Fulcrum Secret Technologies\"];\n var fulcrumSecretServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].FulcrumSecretTechnologies]];\n\n if (fulcrumSecretServer == null) {\n console.error(\"Could not find Fulcrum Secret Technologies Server\");\n } else {\n if (!fulcrumsecrettechonologiesFac.isBanned && !fulcrumsecrettechonologiesFac.isMember && !fulcrumsecrettechonologiesFac.alreadyInvited && fulcrumSecretServer.backdoorInstalled && checkMegacorpRequirements(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].AevumFulcrumTechnologies, 250e3)) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n } //BitRunners\n\n\n var bitrunnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"BitRunners\"];\n var bitrunnersServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].BitRunnersServer]];\n\n if (bitrunnersServer == null) {\n console.error(\"Could not find BitRunners Server\");\n } else if (!bitrunnersFac.isBanned && !bitrunnersFac.isMember && bitrunnersServer.backdoorInstalled && !bitrunnersFac.alreadyInvited) {\n invitedFactions.push(bitrunnersFac);\n } //The Black Hand\n\n\n var theblackhandFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Black Hand\"];\n var blackhandServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].TheBlackHandServer]];\n\n if (blackhandServer == null) {\n console.error(\"Could not find The Black Hand Server\");\n } else if (!theblackhandFac.isBanned && !theblackhandFac.isMember && blackhandServer.backdoorInstalled && !theblackhandFac.alreadyInvited) {\n invitedFactions.push(theblackhandFac);\n } //NiteSec\n\n\n var nitesecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"NiteSec\"];\n var nitesecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].NiteSecServer]];\n\n if (nitesecServer == null) {\n console.error(\"Could not find NiteSec Server\");\n } else if (!nitesecFac.isBanned && !nitesecFac.isMember && nitesecServer.backdoorInstalled && !nitesecFac.alreadyInvited) {\n invitedFactions.push(nitesecFac);\n } //Chongqing\n\n\n var chongqingFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Chongqing\"];\n\n if (!chongqingFac.isBanned && !chongqingFac.isMember && !chongqingFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing) {\n invitedFactions.push(chongqingFac);\n } //Sector-12\n\n\n var sector12Fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Sector-12\"];\n\n if (!sector12Fac.isBanned && !sector12Fac.isMember && !sector12Fac.alreadyInvited && this.money.gte(15000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) {\n invitedFactions.push(sector12Fac);\n } //New Tokyo\n\n\n var newtokyoFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"New Tokyo\"];\n\n if (!newtokyoFac.isBanned && !newtokyoFac.isMember && !newtokyoFac.alreadyInvited && this.money.gte(20000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo) {\n invitedFactions.push(newtokyoFac);\n } //Aevum\n\n\n var aevumFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Aevum\"];\n\n if (!aevumFac.isBanned && !aevumFac.isMember && !aevumFac.alreadyInvited && this.money.gte(40000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum) {\n invitedFactions.push(aevumFac);\n } //Ishima\n\n\n var ishimaFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Ishima\"];\n\n if (!ishimaFac.isBanned && !ishimaFac.isMember && !ishimaFac.alreadyInvited && this.money.gte(30000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) {\n invitedFactions.push(ishimaFac);\n } //Volhaven\n\n\n var volhavenFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Volhaven\"];\n\n if (!volhavenFac.isBanned && !volhavenFac.isMember && !volhavenFac.alreadyInvited && this.money.gte(50000000) && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Volhaven) {\n invitedFactions.push(volhavenFac);\n } //Speakers for the Dead\n\n\n var speakersforthedeadFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Speakers for the Dead\"];\n\n if (!speakersforthedeadFac.isBanned && !speakersforthedeadFac.isMember && !speakersforthedeadFac.alreadyInvited && this.hacking_skill >= 100 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.numPeopleKilled >= 30 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(speakersforthedeadFac);\n } //The Dark Army\n\n\n var thedarkarmyFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Dark Army\"];\n\n if (!thedarkarmyFac.isBanned && !thedarkarmyFac.isMember && !thedarkarmyFac.alreadyInvited && this.hacking_skill >= 300 && this.strength >= 300 && this.defense >= 300 && this.dexterity >= 300 && this.agility >= 300 && this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing && this.numPeopleKilled >= 5 && this.karma <= -45 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thedarkarmyFac);\n } //The Syndicate\n\n\n var thesyndicateFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"The Syndicate\"];\n\n if (!thesyndicateFac.isBanned && !thesyndicateFac.isMember && !thesyndicateFac.alreadyInvited && this.hacking_skill >= 200 && this.strength >= 200 && this.defense >= 200 && this.dexterity >= 200 && this.agility >= 200 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Aevum || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Sector12) && this.money.gte(10000000) && this.karma <= -90 && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12CIA) && !allCompanies.includes(_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_23__[/* LocationName */ \"a\"].Sector12NSA)) {\n invitedFactions.push(thesyndicateFac);\n } //Silhouette\n\n\n var silhouetteFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Silhouette\"];\n\n if (!silhouetteFac.isBanned && !silhouetteFac.isMember && !silhouetteFac.alreadyInvited && (allPositions.includes(\"Chief Technology Officer\") || allPositions.includes(\"Chief Financial Officer\") || allPositions.includes(\"Chief Executive Officer\")) && this.money.gte(15000000) && this.karma <= -22) {\n invitedFactions.push(silhouetteFac);\n } //Tetrads\n\n\n var tetradsFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tetrads\"];\n\n if (!tetradsFac.isBanned && !tetradsFac.isMember && !tetradsFac.alreadyInvited && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima) && this.strength >= 75 && this.defense >= 75 && this.dexterity >= 75 && this.agility >= 75 && this.karma <= -18) {\n invitedFactions.push(tetradsFac);\n } //SlumSnakes\n\n\n var slumsnakesFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Slum Snakes\"];\n\n if (!slumsnakesFac.isBanned && !slumsnakesFac.isMember && !slumsnakesFac.alreadyInvited && this.strength >= 30 && this.defense >= 30 && this.dexterity >= 30 && this.agility >= 30 && this.karma <= -9 && this.money.gte(1000000)) {\n invitedFactions.push(slumsnakesFac);\n } //Netburners\n\n\n var netburnersFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Netburners\"];\n var totalHacknetRam = 0;\n var totalHacknetCores = 0;\n var totalHacknetLevels = 0;\n\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n if (Object(_Hacknet_HacknetHelpers__WEBPACK_IMPORTED_MODULE_19__[/* hasHacknetServers */ \"g\"])(this)) {\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][this.hacknetNodes[i]];\n\n if (hserver) {\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n }\n } else {\n totalHacknetLevels += this.hacknetNodes[i].level;\n totalHacknetRam += this.hacknetNodes[i].ram;\n totalHacknetCores += this.hacknetNodes[i].cores;\n }\n }\n\n if (!netburnersFac.isBanned && !netburnersFac.isMember && !netburnersFac.alreadyInvited && this.hacking_skill >= 80 && totalHacknetRam >= 8 && totalHacknetCores >= 4 && totalHacknetLevels >= 100) {\n invitedFactions.push(netburnersFac);\n } //Tian Di Hui\n\n\n var tiandihuiFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"Tian Di Hui\"];\n\n if (!tiandihuiFac.isBanned && !tiandihuiFac.isMember && !tiandihuiFac.alreadyInvited && this.money.gte(1000000) && this.hacking_skill >= 50 && (this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Chongqing || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].NewTokyo || this.city == _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_22__[/* CityName */ \"a\"].Ishima)) {\n invitedFactions.push(tiandihuiFac);\n } //CyberSec\n\n\n var cybersecFac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][\"CyberSec\"];\n var cybersecServer = _Server_AllServers__WEBPACK_IMPORTED_MODULE_28__[/* AllServers */ \"b\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerIps */ \"a\"][_Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_31__[/* SpecialServerNames */ \"b\"].CyberSecServer]];\n\n if (cybersecServer == null) {\n console.error(\"Could not find CyberSec Server\");\n } else if (!cybersecFac.isBanned && !cybersecFac.isMember && cybersecServer.backdoorInstalled && !cybersecFac.alreadyInvited) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n/************* BitNodes **************/\n\nfunction setBitNodeNumber(n) {\n this.bitNodeN = n;\n}\nfunction queueAugmentation(name) {\n for (const i in this.queuedAugmentations) {\n if (this.queuedAugmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const i in this.augmentations) {\n if (this.augmentations[i].name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.firstAugPurchased = true;\n this.queuedAugmentations.push(new _Augmentation_PlayerOwnedAugmentation__WEBPACK_IMPORTED_MODULE_2__[/* PlayerOwnedAugmentation */ \"a\"](name));\n}\n/************* Coding Contracts **************/\n\nfunction gainCodingContractReward(reward, difficulty = 1) {\n if (reward == null || reward.type == null || reward == null) {\n return `No reward for this contract`;\n }\n /* eslint-disable no-case-declarations */\n\n\n switch (reward.type) {\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputation:\n if (reward.name == null || !(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll:\n const totalGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseFactionRepGain * difficulty; // Ignore Bladeburners and other special factions for this calculation\n\n const specialFactions = [\"Bladeburners\"];\n var factions = this.factions.slice();\n factions = factions.filter(f => {\n return !specialFactions.includes(f);\n }); // If the player was only part of the special factions, we'll just give money\n\n if (factions.length == 0) {\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n\n for (const facName of factions) {\n if (!(_Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName] instanceof _Faction_Faction__WEBPACK_IMPORTED_MODULE_16__[/* Faction */ \"a\"])) {\n continue;\n }\n\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_17__[/* Factions */ \"a\"][facName].playerReputation += gainPerFaction;\n }\n\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].CompanyReputation:\n if (reward.name == null || !(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name] instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_6__[/* Company */ \"a\"])) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n\n var repGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseCompanyRepGain * difficulty;\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n break;\n\n case _CodingContracts__WEBPACK_IMPORTED_MODULE_5__[/* CodingContractRewardType */ \"c\"].Money:\n default:\n var moneyGain = _Constants__WEBPACK_IMPORTED_MODULE_12__[/* CONSTANTS */ \"a\"].CodingContractBaseMoneyGain * difficulty * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_4__[/* BitNodeMultipliers */ \"a\"].CodingContractMoney;\n this.gainMoney(moneyGain);\n this.recordMoneySource(moneyGain, \"codingcontract\");\n return `Gained ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_39__[/* numeralWrapper */ \"a\"].formatMoney(moneyGain)}`;\n break;\n }\n /* eslint-enable no-case-declarations */\n\n}\nfunction travel(to) {\n if (_Locations_Cities__WEBPACK_IMPORTED_MODULE_20__[/* Cities */ \"a\"][to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n\n this.city = to;\n return true;\n}\nfunction gotoLocation(to) {\n if (_Locations_Locations__WEBPACK_IMPORTED_MODULE_21__[/* Locations */ \"a\"][to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n\n this.location = to;\n return true;\n}\nfunction canAccessResleeving() {\n return this.bitNodeN === 10 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_35__[/* SourceFileFlags */ \"a\"][10] > 0;\n}\nfunction giveExploit(exploit) {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n }\n}\nfunction getIntelligenceBonus(weight) {\n return Object(_formulas_intelligence__WEBPACK_IMPORTED_MODULE_26__[/* calculateIntelligenceBonus */ \"a\"])(this.intelligence, weight);\n}\nfunction getCasinoWinnings() {\n return this.moneySourceA.casino;\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.jsx?"); /***/ }), /* 712 */ @@ -4473,7 +4473,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applySourceFile; });\n/* harmony import */ var _SourceFiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFiles */ 277);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n\n\nfunction applySourceFile(srcFile) {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = _SourceFiles__WEBPACK_IMPORTED_MODULE_0__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${srcFile.n}`);\n return;\n }\n\n switch (srcFile.n) {\n case 1:\n {\n // The Source Genesis\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 2:\n {\n // Rise of the Underworld\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n break;\n }\n\n case 3:\n {\n // Corporatocracy\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 4:\n {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n\n case 5:\n {\n // Artificial Intelligence\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n break;\n }\n\n case 6:\n {\n // Bladeburner\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n break;\n }\n\n case 7:\n {\n // Bladeburner 2079\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult *= incMult;\n break;\n }\n\n case 8:\n {\n // Ghost of Wall Street\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n break;\n }\n\n case 9:\n {\n // Hacktocracy\n // This has non-multiplier effects\n break;\n }\n\n case 10:\n {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n\n case 11:\n {\n // The Big Crash\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n break;\n }\n\n case 12:\n // The Recursion\n // No effects, grants neuroflux.\n break;\n\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n\n//# sourceURL=webpack:///./src/SourceFile/applySourceFile.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return applySourceFile; });\n/* harmony import */ var _SourceFiles__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./SourceFiles */ 278);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Player */ 2);\n\n\nfunction applySourceFile(srcFile) {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = _SourceFiles__WEBPACK_IMPORTED_MODULE_0__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${srcFile.n}`);\n return;\n }\n\n switch (srcFile.n) {\n case 1:\n {\n // The Source Genesis\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].faction_rep_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_purchase_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_ram_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_core_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacknet_node_level_cost_mult *= decMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 2:\n {\n // Rise of the Underworld\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].crime_success_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n break;\n }\n\n case 3:\n {\n // Corporatocracy\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].charisma_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n break;\n }\n\n case 4:\n {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n\n case 5:\n {\n // Artificial Intelligence\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_chance_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_speed_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_exp_mult *= incMult;\n break;\n }\n\n case 6:\n {\n // Bladeburner\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_exp_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].strength_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].defense_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].dexterity_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].agility_mult *= incMult;\n break;\n }\n\n case 7:\n {\n // Bladeburner 2079\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_max_stamina_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_stamina_gain_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_analysis_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].bladeburner_success_chance_mult *= incMult;\n break;\n }\n\n case 8:\n {\n // Ghost of Wall Street\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].hacking_grow_mult *= incMult;\n break;\n }\n\n case 9:\n {\n // Hacktocracy\n // This has non-multiplier effects\n break;\n }\n\n case 10:\n {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n\n case 11:\n {\n // The Big Crash\n let mult = 0;\n\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n\n const incMult = 1 + mult / 100;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].work_money_mult *= incMult;\n _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].company_rep_mult *= incMult;\n break;\n }\n\n case 12:\n // The Recursion\n // No effects, grants neuroflux.\n break;\n\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n\n//# sourceURL=webpack:///./src/SourceFile/applySourceFile.ts?"); /***/ }), /* 714 */ @@ -4521,7 +4521,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SidebarRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 16);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Drawer */ 1350);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Divider */ 494);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ChevronLeft */ 757);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ 755);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/ListItemIcon */ 101);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Badge */ 581);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Computer */ 760);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 398);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Create */ 762);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Storage */ 763);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/BugReport */ 764);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/icons-material/Equalizer */ 766);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/icons-material/Contacts */ 767);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 447);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/icons-material/AccountTree */ 768);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/icons-material/PeopleAlt */ 769);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/icons-material/LocationCity */ 771);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/icons-material/AirplanemodeActive */ 772);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material/Work */ 773);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material/TrendingUp */ 774);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material/FormatBold */ 775);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material/Business */ 776);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material/SportsMma */ 777);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material/Check */ 779);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material/Help */ 780);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material/Settings */ 781);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material/DeveloperBoard */ 782);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material/AccountBox */ 765);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material/Public */ 770);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/icons-material/LiveHelp */ 778);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 261);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../ui/Router */ 25);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n/* harmony import */ var _Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../Programs/ProgramHelpers */ 443);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../Missions */ 118);\n/* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../CinematicText */ 718);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Terminal\n\n // Create Script\n\n // Active Scripts\n\n // Create Program\n\n // Stats\n\n // Factions\n\n // Augmentations\n\n // Hacknet\n\n // Sleeves\n\n // City\n\n // Travel\n\n // Job\n\n // Stock Market\n\n // Bladeburner\n\n // Corp\n\n // Gang\n\n // Milestones\n\n // Tutorial\n\n // options\n\n // Dev\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst openedMixin = theme => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n overflowX: \"hidden\"\n});\n\nconst closedMixin = theme => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`\n }\n});\n\nconst Drawer = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(_mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n shouldForwardProp: prop => prop !== \"open\"\n})(({\n theme,\n open\n}) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && { ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme)\n }),\n ...(!open && { ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme)\n })\n}));\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main\n },\n listitem: {}\n}));\nfunction SidebarRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n const [hackingOpen, setHackingOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [characterOpen, setCharacterOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [worldOpen, setWorldOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [helpOpen, setHelpOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const flashTerminal = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].CharacterGoToTerminalPage || _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].ActiveScriptsPage;\n const flashStats = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToCharacterPage;\n const flashActiveScripts = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].TerminalGoToActiveScriptsPage;\n const flashHacknet = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToHacknetNodesPage;\n const flashCity = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].HacknetNodesGoToWorldPage;\n const flashTutorial = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].WorldDescription;\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.length;\n const programCount = Object(_Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__[/* getAvailableCreatePrograms */ \"a\"])(props.player).length;\n const canCreateProgram = programCount > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenFactions = props.player.factionInvitations.length > 0 || props.player.factions.length > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenAugmentations = props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenSleeves = props.player.sleeves.length > 0; // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n\n function clickTerminal() {\n props.router.toTerminal();\n if (flashTerminal) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateScripts() {\n props.router.toScriptEditor();\n }\n\n function clickStats() {\n props.router.toCharacterInfo();\n if (flashStats) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickActiveScripts() {\n props.router.toActiveScripts();\n if (flashActiveScripts) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateProgram() {\n props.router.toCreateProgram();\n }\n\n function clickFactions() {\n props.router.toFactions();\n }\n\n function clickAugmentations() {\n props.router.toAugmentations();\n }\n\n function clickSleeves() {\n props.router.toSleeves();\n }\n\n function clickHacknet() {\n props.router.toHacknetNodes();\n if (flashHacknet) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCity() {\n props.router.toCity();\n if (flashCity) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickTravel() {\n props.router.toTravel();\n }\n\n function clickJob() {\n props.router.toJob();\n }\n\n function clickStockMarket() {\n props.router.toStockMarket();\n }\n\n function clickBladeburner() {\n props.router.toBladeburner();\n }\n\n function clickCorp() {\n props.router.toCorporation();\n }\n\n function clickGang() {\n props.router.toGang();\n }\n\n function clickTutorial() {\n props.router.toTutorial();\n if (flashTutorial) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickMilestones() {\n props.router.toMilestones();\n }\n\n function clickOptions() {\n props.router.toGameOptions();\n }\n\n function clickDev() {\n props.router.toDevMenu();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_46__[/* Settings */ \"a\"].DisableHotkeys) return;\n if (props.player.isWorking || _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* redPillFlag */ \"b\"] || _Missions__WEBPACK_IMPORTED_MODULE_48__[/* inMission */ \"c\"] || _CinematicText__WEBPACK_IMPORTED_MODULE_49__[/* cinematicTextFlag */ \"a\"]) return;\n\n if (event.keyCode == _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].E && event.altKey) {\n event.preventDefault();\n clickCreateScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].F && event.altKey) {\n // Overriden by Fconf\n if (props.page == _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal && _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n return;\n }\n\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].G && event.altKey) {\n event.preventDefault();\n clickGang();\n } // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n const classes = useStyles();\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n const toggleDrawer = () => setOpen(old => !old);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Drawer, {\n open: open,\n anchor: \"left\",\n variant: \"permanent\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: toggleDrawer\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, !open ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Bitburner v\", _Constants__WEBPACK_IMPORTED_MODULE_43__[/* CONSTANTS */ \"a\"].Version)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHackingOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Hacking\")\n }), hackingOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: hackingOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Terminal\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal\n }),\n onClick: clickTerminal\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n }, \"Terminal\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Create Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript\n }),\n onClick: clickCreateScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n }, \"Create Script\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Active Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts\n }),\n onClick: clickActiveScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default.a, {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n }, \"Active Scripts\"))), canCreateProgram && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Create Program\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram\n }),\n onClick: clickCreateProgram\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: programCount > 0 ? programCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }, \"Create Program\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setCharacterOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Character\")\n }), characterOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: characterOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Stats\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats\n }),\n onClick: clickStats\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default.a, {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n }, \"Stats\"))), canOpenFactions && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Factions\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: [_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page)\n }),\n onClick: clickFactions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: invitationsCount !== 0 ? invitationsCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default.a, {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }, \"Factions\"))), canOpenAugmentations && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Augmentations\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations\n }),\n onClick: clickAugmentations\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: augmentationCount !== 0 ? augmentationCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n },\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }, \"Augmentations\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Hacknet\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet\n }),\n onClick: clickHacknet\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default.a, {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n }, \"Hacknet\"))), canOpenSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Sleeves\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves\n }),\n onClick: clickSleeves\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n }, \"Sleeves\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setWorldOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"World\")\n }), worldOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: worldOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"City\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Resleeves || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Location\n }),\n onClick: clickCity\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default.a, {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n }, \"City\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Travel\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel\n }),\n onClick: clickTravel\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n }, \"Travel\"))), canJob && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Job\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job\n }),\n onClick: clickJob\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n }, \"Job\"))), canStockMarket && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Stock Market\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket\n }),\n onClick: clickStockMarket\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n }, \"Stock Market\"))), canBladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Bladeburner\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner\n }),\n onClick: clickBladeburner\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n }, \"Bladeburner\"))), canCorporation && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Corp\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation\n }),\n onClick: clickCorp\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n }, \"Corp\"))), canGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Gang\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang\n }),\n onClick: clickGang\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n }, \"Gang\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHelpOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Help\")\n }), helpOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: helpOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Milestones\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones\n }),\n onClick: clickMilestones\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n }, \"Milestones\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Tutorial\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial\n }),\n onClick: clickTutorial\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default.a, {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n }, \"Tutorial\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Options\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options\n }),\n onClick: clickOptions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n }, \"Options\"))), true && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Dev\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu\n }),\n onClick: clickDev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n }, \"Dev\"))))));\n}\n\n//# sourceURL=webpack:///./src/Sidebar/ui/SidebarRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SidebarRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_material_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/styles */ 16);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Drawer */ 1353);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Divider */ 494);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ChevronLeft */ 757);\n/* harmony import */ var _mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ChevronRight */ 755);\n/* harmony import */ var _mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/ListItemIcon */ 101);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Badge */ 581);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/Computer */ 760);\n/* harmony import */ var _mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/LastPage */ 399);\n/* harmony import */ var _mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Create */ 762);\n/* harmony import */ var _mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @mui/icons-material/Storage */ 763);\n/* harmony import */ var _mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @mui/icons-material/BugReport */ 764);\n/* harmony import */ var _mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @mui/icons-material/Equalizer */ 766);\n/* harmony import */ var _mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @mui/icons-material/Contacts */ 767);\n/* harmony import */ var _mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @mui/icons-material/DoubleArrow */ 448);\n/* harmony import */ var _mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @mui/icons-material/AccountTree */ 768);\n/* harmony import */ var _mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @mui/icons-material/PeopleAlt */ 769);\n/* harmony import */ var _mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @mui/icons-material/LocationCity */ 771);\n/* harmony import */ var _mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @mui/icons-material/AirplanemodeActive */ 772);\n/* harmony import */ var _mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @mui/icons-material/Work */ 773);\n/* harmony import */ var _mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @mui/icons-material/TrendingUp */ 774);\n/* harmony import */ var _mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29__);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @mui/icons-material/FormatBold */ 775);\n/* harmony import */ var _mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30__);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @mui/icons-material/Business */ 776);\n/* harmony import */ var _mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31__);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @mui/icons-material/SportsMma */ 777);\n/* harmony import */ var _mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32__);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @mui/icons-material/Check */ 779);\n/* harmony import */ var _mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33__);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @mui/icons-material/Help */ 780);\n/* harmony import */ var _mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34__);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! @mui/icons-material/Settings */ 781);\n/* harmony import */ var _mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35__);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! @mui/icons-material/DeveloperBoard */ 782);\n/* harmony import */ var _mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36__);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! @mui/icons-material/AccountBox */ 765);\n/* harmony import */ var _mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37__);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! @mui/icons-material/Public */ 770);\n/* harmony import */ var _mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38__);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! @mui/icons-material/LiveHelp */ 778);\n/* harmony import */ var _mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40__);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41__);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../ui/Router */ 26);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n/* harmony import */ var _Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../Programs/ProgramHelpers */ 444);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../RedPill */ 222);\n/* harmony import */ var _Missions__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../Missions */ 119);\n/* harmony import */ var _CinematicText__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../CinematicText */ 718);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n // Terminal\n\n // Create Script\n\n // Active Scripts\n\n // Create Program\n\n // Stats\n\n // Factions\n\n // Augmentations\n\n // Hacknet\n\n // Sleeves\n\n // City\n\n // Travel\n\n // Job\n\n // Stock Market\n\n // Bladeburner\n\n // Corp\n\n // Gang\n\n // Milestones\n\n // Tutorial\n\n // options\n\n // Dev\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst openedMixin = theme => ({\n width: theme.spacing(31),\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.enteringScreen\n }),\n overflowX: \"hidden\"\n});\n\nconst closedMixin = theme => ({\n transition: theme.transitions.create(\"width\", {\n easing: theme.transitions.easing.sharp,\n duration: theme.transitions.duration.leavingScreen\n }),\n overflowX: \"hidden\",\n width: `calc(${theme.spacing(2)} + 1px)`,\n [theme.breakpoints.up(\"sm\")]: {\n width: `calc(${theme.spacing(7)} + 1px)`\n }\n});\n\nconst Drawer = Object(_mui_material_styles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(_mui_material_Drawer__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n shouldForwardProp: prop => prop !== \"open\"\n})(({\n theme,\n open\n}) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && { ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme)\n }),\n ...(!open && { ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme)\n })\n}));\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main\n },\n listitem: {}\n}));\nfunction SidebarRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n const [hackingOpen, setHackingOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [characterOpen, setCharacterOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [worldOpen, setWorldOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const [helpOpen, setHelpOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n const flashTerminal = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].CharacterGoToTerminalPage || _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].ActiveScriptsPage;\n const flashStats = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToCharacterPage;\n const flashActiveScripts = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].TerminalGoToActiveScriptsPage;\n const flashHacknet = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].GoToHacknetNodesPage;\n const flashCity = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].HacknetNodesGoToWorldPage;\n const flashTutorial = _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialSteps */ \"d\"].WorldDescription;\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.length;\n const programCount = Object(_Programs_ProgramHelpers__WEBPACK_IMPORTED_MODULE_45__[/* getAvailableCreatePrograms */ \"a\"])(props.player).length;\n const canCreateProgram = programCount > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenFactions = props.player.factionInvitations.length > 0 || props.player.factions.length > 0 || props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenAugmentations = props.player.augmentations.length > 0 || props.player.queuedAugmentations.length > 0 || props.player.sourceFiles.length > 0;\n const canOpenSleeves = props.player.sleeves.length > 0; // TODO(hydroflame): these should not as any but right now the def is that it\n // can only be defined;\n\n const canCorporation = !!props.player.corporation;\n const canGang = !!props.player.gang;\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!props.player.bladeburner;\n\n function clickTerminal() {\n props.router.toTerminal();\n if (flashTerminal) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateScripts() {\n props.router.toScriptEditor();\n }\n\n function clickStats() {\n props.router.toCharacterInfo();\n if (flashStats) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickActiveScripts() {\n props.router.toActiveScripts();\n if (flashActiveScripts) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCreateProgram() {\n props.router.toCreateProgram();\n }\n\n function clickFactions() {\n props.router.toFactions();\n }\n\n function clickAugmentations() {\n props.router.toAugmentations();\n }\n\n function clickSleeves() {\n props.router.toSleeves();\n }\n\n function clickHacknet() {\n props.router.toHacknetNodes();\n if (flashHacknet) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickCity() {\n props.router.toCity();\n if (flashCity) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickTravel() {\n props.router.toTravel();\n }\n\n function clickJob() {\n props.router.toJob();\n }\n\n function clickStockMarket() {\n props.router.toStockMarket();\n }\n\n function clickBladeburner() {\n props.router.toBladeburner();\n }\n\n function clickCorp() {\n props.router.toCorporation();\n }\n\n function clickGang() {\n props.router.toGang();\n }\n\n function clickTutorial() {\n props.router.toTutorial();\n if (flashTutorial) Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_44__[/* iTutorialNextStep */ \"b\"])();\n }\n\n function clickMilestones() {\n props.router.toMilestones();\n }\n\n function clickOptions() {\n props.router.toGameOptions();\n }\n\n function clickDev() {\n props.router.toDevMenu();\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n // Shortcuts to navigate through the game\n // Alt-t - Terminal\n // Alt-c - Character\n // Alt-e - Script editor\n // Alt-s - Active scripts\n // Alt-h - Hacknet Nodes\n // Alt-w - City\n // Alt-j - Job\n // Alt-r - Travel Agency of current city\n // Alt-p - Create program\n // Alt-f - Factions\n // Alt-a - Augmentations\n // Alt-u - Tutorial\n // Alt-o - Options\n function handleShortcuts(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_46__[/* Settings */ \"a\"].DisableHotkeys) return;\n if (props.player.isWorking || _RedPill__WEBPACK_IMPORTED_MODULE_47__[/* redPillFlag */ \"b\"] || _Missions__WEBPACK_IMPORTED_MODULE_48__[/* inMission */ \"c\"] || _CinematicText__WEBPACK_IMPORTED_MODULE_49__[/* cinematicTextFlag */ \"a\"]) return;\n\n if (event.keyCode == _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].E && event.altKey) {\n event.preventDefault();\n clickCreateScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].J && event.altKey) {\n event.preventDefault();\n clickJob();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].F && event.altKey) {\n // Overriden by Fconf\n if (props.page == _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal && _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_51__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n return;\n }\n\n event.preventDefault();\n clickFactions();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_50__[/* KEY */ \"a\"].G && event.altKey) {\n event.preventDefault();\n clickGang();\n } // if (event.keyCode === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n\n }\n\n document.addEventListener(\"keypress\", handleShortcuts);\n return () => document.removeEventListener(\"keypress\", handleShortcuts);\n }, []);\n const classes = useStyles();\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n const toggleDrawer = () => setOpen(old => !old);\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Drawer, {\n open: open,\n anchor: \"left\",\n variant: \"permanent\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: toggleDrawer\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, !open ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronRight__WEBPACK_IMPORTED_MODULE_9___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ChevronLeft__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Bitburner v\", _Constants__WEBPACK_IMPORTED_MODULE_43__[/* CONSTANTS */ \"a\"].Version)\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHackingOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Computer__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Hacking\")\n }), hackingOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: hackingOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Terminal\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal\n }),\n onClick: clickTerminal\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LastPage__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTerminal ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Terminal ? \"secondary\" : \"primary\"\n }, \"Terminal\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Create Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript\n }),\n onClick: clickCreateScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Create__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateScript ? \"secondary\" : \"primary\"\n }, \"Create Script\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Active Scripts\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts\n }),\n onClick: clickActiveScripts\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Storage__WEBPACK_IMPORTED_MODULE_19___default.a, {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashActiveScripts ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].ActiveScripts ? \"secondary\" : \"primary\"\n }, \"Active Scripts\"))), canCreateProgram && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Create Program\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram\n }),\n onClick: clickCreateProgram\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: programCount > 0 ? programCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_BugReport__WEBPACK_IMPORTED_MODULE_20___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].CreateProgram ? \"secondary\" : \"primary\"\n }, \"Create Program\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setCharacterOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountBox__WEBPACK_IMPORTED_MODULE_37___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Character\")\n }), characterOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: characterOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Stats\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats\n }),\n onClick: clickStats\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Equalizer__WEBPACK_IMPORTED_MODULE_21___default.a, {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashStats ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Stats ? \"secondary\" : \"primary\"\n }, \"Stats\"))), canOpenFactions && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Factions\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: [_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page)\n }),\n onClick: clickFactions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: invitationsCount !== 0 ? invitationsCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Contacts__WEBPACK_IMPORTED_MODULE_22___default.a, {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: ![_ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Factions, _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Faction].includes(props.page) ? \"secondary\" : \"primary\"\n }, \"Factions\"))), canOpenAugmentations && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Augmentations\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations\n }),\n onClick: clickAugmentations\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Badge__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n badgeContent: augmentationCount !== 0 ? augmentationCount : undefined,\n color: \"error\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DoubleArrow__WEBPACK_IMPORTED_MODULE_23___default.a, {\n style: {\n transform: \"rotate(-90deg)\"\n },\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Augmentations ? \"secondary\" : \"primary\"\n }, \"Augmentations\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Hacknet\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet\n }),\n onClick: clickHacknet\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AccountTree__WEBPACK_IMPORTED_MODULE_24___default.a, {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashHacknet ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Hacknet ? \"secondary\" : \"primary\"\n }, \"Hacknet\"))), canOpenSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Sleeves\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves\n }),\n onClick: clickSleeves\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_PeopleAlt__WEBPACK_IMPORTED_MODULE_25___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Sleeves ? \"secondary\" : \"primary\"\n }, \"Sleeves\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setWorldOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Public__WEBPACK_IMPORTED_MODULE_38___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"World\")\n }), worldOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: worldOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"City\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Resleeves || props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Location\n }),\n onClick: clickCity\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LocationCity__WEBPACK_IMPORTED_MODULE_26___default.a, {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashCity ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].City ? \"secondary\" : \"primary\"\n }, \"City\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Travel\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel\n }),\n onClick: clickTravel\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_AirplanemodeActive__WEBPACK_IMPORTED_MODULE_27___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Travel ? \"secondary\" : \"primary\"\n }, \"Travel\"))), canJob && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Job\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job\n }),\n onClick: clickJob\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Work__WEBPACK_IMPORTED_MODULE_28___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Job ? \"secondary\" : \"primary\"\n }, \"Job\"))), canStockMarket && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Stock Market\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket\n }),\n onClick: clickStockMarket\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_TrendingUp__WEBPACK_IMPORTED_MODULE_29___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].StockMarket ? \"secondary\" : \"primary\"\n }, \"Stock Market\"))), canBladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Bladeburner\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner\n }),\n onClick: clickBladeburner\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_FormatBold__WEBPACK_IMPORTED_MODULE_30___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Bladeburner ? \"secondary\" : \"primary\"\n }, \"Bladeburner\"))), canCorporation && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Corp\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation\n }),\n onClick: clickCorp\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Business__WEBPACK_IMPORTED_MODULE_31___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Corporation ? \"secondary\" : \"primary\"\n }, \"Corp\"))), canGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Gang\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang\n }),\n onClick: clickGang\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SportsMma__WEBPACK_IMPORTED_MODULE_32___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Gang ? \"secondary\" : \"primary\"\n }, \"Gang\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Divider__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n onClick: () => setHelpOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_LiveHelp__WEBPACK_IMPORTED_MODULE_39___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, \"Help\")\n }), helpOpen ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_40___default.a, null) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_41___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n in: helpOpen,\n timeout: \"auto\",\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Milestones\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones\n }),\n onClick: clickMilestones\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Check__WEBPACK_IMPORTED_MODULE_33___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Milestones ? \"secondary\" : \"primary\"\n }, \"Milestones\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Tutorial\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial\n }),\n onClick: clickTutorial\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Help__WEBPACK_IMPORTED_MODULE_34___default.a, {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: flashTutorial ? \"error\" : props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Tutorial ? \"secondary\" : \"primary\"\n }, \"Tutorial\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n button: true,\n key: \"Options\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options\n }),\n onClick: clickOptions\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Settings__WEBPACK_IMPORTED_MODULE_35___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].Options ? \"secondary\" : \"primary\"\n }, \"Options\"))), true && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.listitem\n },\n button: true,\n key: \"Dev\",\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n [classes.active]: props.page === _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu\n }),\n onClick: clickDev\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemIcon__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_DeveloperBoard__WEBPACK_IMPORTED_MODULE_36___default.a, {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n color: props.page !== _ui_Router__WEBPACK_IMPORTED_MODULE_42__[/* Page */ \"a\"].DevMenu ? \"secondary\" : \"primary\"\n }, \"Dev\"))))));\n}\n\n//# sourceURL=webpack:///./src/Sidebar/ui/SidebarRoot.tsx?"); /***/ }), /* 718 */ @@ -4533,7 +4533,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cinematicTextFlag; });\n/* unused harmony export writeCinematicText */\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 128);\n/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 529);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n\n\n\n\n\n\nlet cinematicTextFlag = false;\n/**\n * Print a message using a hacking-style \"typing\" effect.\n * Note that this clears the UI so that the text from this is the only thing visible.\n *\n * @param lines {string[]} Array of strings to print, where each element is a separate line\n */\n\nfunction writeCinematicText(lines) {\n cinematicTextFlag = true;\n\n if (lines.constructor !== Array) {\n throw new Error(\"Invalid non-array argument passed into writeCinematicText()\");\n } // Reuse the 'Red Pill' content\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadCinematicTextContent();\n const container = document.getElementById(\"cinematic-text-container\");\n container.style.width = \"75%\";\n\n if (container == null) {\n throw new Error(\"Could not find cinematic-text-container for writeCinematicText()\");\n }\n\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n\n for (let i = 0; i < lines.length; ++i) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__[/* isString */ \"a\"])(lines[i])) {\n throw new Error(\"Invalid non-string element in 'lines' argument. writeCinematicText() failed\");\n }\n }\n\n return writeCinematicTextRecurse(lines).then(function () {\n return cinematicTextEnd(); //Puts the continue button\n }).catch(function (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n });\n}\n\nfunction writeCinematicTextRecurse(lines, lineNumber = 0) {\n if (lineNumber >= lines.length) {\n return Promise.resolve(true);\n }\n\n return writeCinematicTextLine(lines[lineNumber]).then(function () {\n return writeCinematicTextRecurse(lines, lineNumber + 1);\n });\n}\n\nfunction writeCinematicTextLine(line) {\n return new Promise(function (resolve, reject) {\n const container = document.getElementById(\"cinematic-text-container\");\n const pElem = document.createElement(\"p\");\n container.appendChild(pElem);\n const promise = writeCinematicTextLetter(pElem, line, 0);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n });\n}\n\nfunction writeCinematicTextLetter(pElem, line, i = 0) {\n return new Promise(function (resolve, reject) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n const textToShow = line.substring(0, i);\n\n if (i >= line.length) {\n pElem.innerHTML = textToShow;\n return resolve(true);\n }\n\n pElem.innerHTML = textToShow + \"\";\n const promise = writeCinematicTextLetter(pElem, line, i + 1);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n }, 15);\n });\n}\n\nfunction cinematicTextEnd() {\n var container = document.getElementById(\"cinematic-text-container\");\n var mainMenu = document.getElementById(\"mainmenu-container\");\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"br\"));\n return new Promise(function (resolve) {\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n innerText: \"Continue...\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadTerminalContent();\n mainMenu.style.visibility = \"visible\";\n cinematicTextFlag = false;\n resolve();\n }\n }));\n });\n}\n\n//# sourceURL=webpack:///./src/CinematicText.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return cinematicTextFlag; });\n/* unused harmony export writeCinematicText */\n/* harmony import */ var _engine__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./engine */ 138);\n/* harmony import */ var _utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/SetTimeoutRef */ 129);\n/* harmony import */ var _utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../utils/uiHelpers/removeChildrenFromElement */ 529);\n/* harmony import */ var _utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../utils/uiHelpers/createElement */ 113);\n/* harmony import */ var _utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils/helpers/exceptionAlert */ 170);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils/helpers/isString */ 82);\n\n\n\n\n\n\nlet cinematicTextFlag = false;\n/**\n * Print a message using a hacking-style \"typing\" effect.\n * Note that this clears the UI so that the text from this is the only thing visible.\n *\n * @param lines {string[]} Array of strings to print, where each element is a separate line\n */\n\nfunction writeCinematicText(lines) {\n cinematicTextFlag = true;\n\n if (lines.constructor !== Array) {\n throw new Error(\"Invalid non-array argument passed into writeCinematicText()\");\n } // Reuse the 'Red Pill' content\n\n\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadCinematicTextContent();\n const container = document.getElementById(\"cinematic-text-container\");\n container.style.width = \"75%\";\n\n if (container == null) {\n throw new Error(\"Could not find cinematic-text-container for writeCinematicText()\");\n }\n\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n\n for (let i = 0; i < lines.length; ++i) {\n if (!Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_5__[/* isString */ \"a\"])(lines[i])) {\n throw new Error(\"Invalid non-string element in 'lines' argument. writeCinematicText() failed\");\n }\n }\n\n return writeCinematicTextRecurse(lines).then(function () {\n return cinematicTextEnd(); //Puts the continue button\n }).catch(function (e) {\n Object(_utils_helpers_exceptionAlert__WEBPACK_IMPORTED_MODULE_4__[/* exceptionAlert */ \"a\"])(e);\n });\n}\n\nfunction writeCinematicTextRecurse(lines, lineNumber = 0) {\n if (lineNumber >= lines.length) {\n return Promise.resolve(true);\n }\n\n return writeCinematicTextLine(lines[lineNumber]).then(function () {\n return writeCinematicTextRecurse(lines, lineNumber + 1);\n });\n}\n\nfunction writeCinematicTextLine(line) {\n return new Promise(function (resolve, reject) {\n const container = document.getElementById(\"cinematic-text-container\");\n const pElem = document.createElement(\"p\");\n container.appendChild(pElem);\n const promise = writeCinematicTextLetter(pElem, line, 0);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n });\n}\n\nfunction writeCinematicTextLetter(pElem, line, i = 0) {\n return new Promise(function (resolve, reject) {\n Object(_utils_SetTimeoutRef__WEBPACK_IMPORTED_MODULE_1__[/* setTimeoutRef */ \"a\"])(function () {\n const textToShow = line.substring(0, i);\n\n if (i >= line.length) {\n pElem.innerHTML = textToShow;\n return resolve(true);\n }\n\n pElem.innerHTML = textToShow + \"\";\n const promise = writeCinematicTextLetter(pElem, line, i + 1);\n promise.then(function (res) {\n resolve(res);\n }, function (e) {\n reject(e);\n });\n }, 15);\n });\n}\n\nfunction cinematicTextEnd() {\n var container = document.getElementById(\"cinematic-text-container\");\n var mainMenu = document.getElementById(\"mainmenu-container\");\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"br\"));\n return new Promise(function (resolve) {\n container.appendChild(Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_3__[/* createElement */ \"a\"])(\"a\", {\n class: \"a-link-button\",\n innerText: \"Continue...\",\n clickListener: () => {\n Object(_utils_uiHelpers_removeChildrenFromElement__WEBPACK_IMPORTED_MODULE_2__[/* removeChildrenFromElement */ \"a\"])(container);\n _engine__WEBPACK_IMPORTED_MODULE_0__[\"Engine\"].loadTerminalContent();\n mainMenu.style.visibility = \"visible\";\n cinematicTextFlag = false;\n resolve();\n }\n }));\n });\n}\n\n//# sourceURL=webpack:///./src/CinematicText.js?"); /***/ }), /* 719 */, @@ -4633,7 +4633,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 448);\n/**\n * React Component for displaying a list of the player's installed Augmentations\n * on the Augmentations UI\n */\n\n\n\n\n\n\n\nfunction InstalledAugmentations() {\n const sourceAugs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].augmentations.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n const augs = sourceAugs.map(e => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][e.name];\n let level = null;\n\n if (e.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = e.level;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InstalledAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 449);\n/**\n * React Component for displaying a list of the player's installed Augmentations\n * on the Augmentations UI\n */\n\n\n\n\n\n\n\nfunction InstalledAugmentations() {\n const sourceAugs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].augmentations.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_5__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name <= aug2.name ? -1 : 1;\n });\n }\n\n const augs = sourceAugs.map(e => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][e.name];\n let level = null;\n\n if (e.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = e.level;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx?"); /***/ }), /* 786 */ @@ -4657,7 +4657,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 277);\n/* harmony import */ var _ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/SourceFileAccordion */ 788);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\n\n\nfunction OwnedSourceFiles() {\n const sourceSfs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].sourceFiles.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n const sfs = sourceSfs.map(e => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.n\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__[/* SourceFileAccordion */ \"a\"], {\n level: e.lvl,\n sf: sfObj\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, sfs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OwnedSourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../SourceFile/SourceFiles */ 278);\n/* harmony import */ var _ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/SourceFileAccordion */ 788);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\n\n\nfunction OwnedSourceFiles() {\n const sourceSfs = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].sourceFiles.slice();\n\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].OwnedAugmentationsOrder === _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_3__[/* OwnedAugmentationsOrderSetting */ \"a\"].Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n const sfs = sourceSfs.map(e => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = _SourceFile_SourceFiles__WEBPACK_IMPORTED_MODULE_4__[/* SourceFiles */ \"a\"][srcFileKey];\n\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: e.n\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_SourceFileAccordion__WEBPACK_IMPORTED_MODULE_5__[/* SourceFileAccordion */ \"a\"], {\n level: e.lvl,\n sf: sfObj\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, sfs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx?"); /***/ }), /* 788 */ @@ -4681,7 +4681,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileMinus1; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exploits/Exploit */ 222);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\nfunction SourceFileMinus1() {\n const exploits = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].exploits;\n\n if (exploits.length === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: -1\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Source-File -1: Exploits in the BitNodes\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Level \", exploits.length, \" / ?\"),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"It increases all of the player's multipliers by 0.1%\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"You have found the following exploits:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, exploits.map(c => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: c\n }, \"* \", Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* ExploitName */ \"b\"])(c)))))\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFileMinus1; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Exploits/Exploit */ 223);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\n\n\n\n\nfunction SourceFileMinus1() {\n const exploits = _Player__WEBPACK_IMPORTED_MODULE_1__[/* Player */ \"a\"].exploits;\n\n if (exploits.length === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: -1\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_3__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Source-File -1: Exploits in the BitNodes\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), \"Level \", exploits.length, \" / ?\"),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"It increases all of the player's multipliers by 0.1%\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"You have found the following exploits:\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, exploits.map(c => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: c\n }, \"* \", Object(_Exploits_Exploit__WEBPACK_IMPORTED_MODULE_2__[/* ExploitName */ \"b\"])(c)))))\n }));\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx?"); /***/ }), /* 790 */ @@ -4705,7 +4705,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchasedAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 448);\n/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\n\n\n\n\n\nfunction PurchasedAugmentations() {\n const augs = []; // Only render the last NeuroFlux (there are no findLastIndex btw)\n\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length; i++) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i];\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n let level = null;\n\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n\n augs.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: `${ownedAug.name}${ownedAug.level}`\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\"\n }, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchasedAugmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/AugmentationAccordion */ 449);\n/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\n\n\n\n\n\nfunction PurchasedAugmentations() {\n const augs = []; // Only render the last NeuroFlux (there are no findLastIndex btw)\n\n let nfgIndex = -1;\n\n for (let i = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length - 1; i >= 0; i--) {\n if (_Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i].name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n\n for (let i = 0; i < _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations.length; i++) {\n const ownedAug = _Player__WEBPACK_IMPORTED_MODULE_3__[/* Player */ \"a\"].queuedAugmentations[i];\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][ownedAug.name];\n let level = null;\n\n if (ownedAug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_2__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n\n augs.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: `${ownedAug.name}${ownedAug.level}`\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AugmentationAccordion__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationAccordion */ \"a\"], {\n aug: aug,\n level: level\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"augmentations-list\"\n }, augs);\n}\n\n//# sourceURL=webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx?"); /***/ }), /* 792 */ @@ -4729,7 +4729,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return General; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\n\nfunction General(props) {\n function addMoney(n) {\n return function () {\n props.player.gainMoney(n);\n };\n }\n\n function upgradeRam() {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3() {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3() {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n() {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n() {\n props.router.toBitVerse(false, false);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"General\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e6)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e6\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e9)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e9\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e12)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e15)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1000e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(Infinity)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: Infinity\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: upgradeRam\n }, \"+ RAM\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickB1tFlum3\n }, \"Quick b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: b1tflum3\n }, \"Run b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickHackW0r1dD43m0n\n }, \"Quick w0rld_d34m0n\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: hackW0r1dD43m0n\n }, \"Hack w0rld_d34m0n\"))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/General.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return General; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\n\nfunction General(props) {\n function addMoney(n) {\n return function () {\n props.player.gainMoney(n);\n };\n }\n\n function upgradeRam() {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3() {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3() {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n() {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n() {\n props.router.toBitVerse(false, false);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"General\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e6)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e6\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e9)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e9\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e12)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(1e15)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: 1000e12\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addMoney(Infinity)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"+ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: Infinity\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: upgradeRam\n }, \"+ RAM\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickB1tFlum3\n }, \"Quick b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: b1tflum3\n }, \"Run b1t_flum3.exe\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: quickHackW0r1dD43m0n\n }, \"Quick w0rld_d34m0n\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: hackW0r1dD43m0n\n }, \"Hack w0rld_d34m0n\"))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/General.tsx?"); /***/ }), /* 794 */, @@ -4742,7 +4742,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Stats(props) {\n function modifyExp(stat, modifier) {\n return function (exp) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n\n break;\n\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n\n break;\n\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n\n break;\n\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n\n break;\n\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n\n break;\n\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n\n break;\n\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier) {\n return function (amt) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp() {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp() {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat) {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma() {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence() {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence() {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Experience / Stats\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfExp\n }, \"Tons of exp\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllExp\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Hacking:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"hacking\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"hacking\", 1)(bigNumber),\n add: modifyExp(\"hacking\", 1),\n subtract: modifyExp(\"hacking\", -1),\n reset: resetExperience(\"hacking\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Strength:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"strength\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"strength\", 1)(bigNumber),\n add: modifyExp(\"strength\", 1),\n subtract: modifyExp(\"strength\", -1),\n reset: resetExperience(\"strength\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Defense:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"defense\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"defense\", 1)(bigNumber),\n add: modifyExp(\"defense\", 1),\n subtract: modifyExp(\"defense\", -1),\n reset: resetExperience(\"defense\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Dexterity:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"dexterity\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"dexterity\", 1)(bigNumber),\n add: modifyExp(\"dexterity\", 1),\n subtract: modifyExp(\"dexterity\", -1),\n reset: resetExperience(\"dexterity\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Agility:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"agility\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"agility\", 1)(bigNumber),\n add: modifyExp(\"agility\", 1),\n subtract: modifyExp(\"agility\", -1),\n reset: resetExperience(\"agility\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Charisma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"charisma\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"charisma\", 1)(bigNumber),\n add: modifyExp(\"charisma\", 1),\n subtract: modifyExp(\"charisma\", -1),\n reset: resetExperience(\"charisma\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Intelligence:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"intelligence\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"intelligence\", 1)(bigNumber),\n add: modifyExp(\"intelligence\", 1),\n subtract: modifyExp(\"intelligence\", -1),\n reset: resetExperience(\"intelligence\")\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: enableIntelligence\n }, \"Enable\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: disableIntelligence\n }, \"Disable\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Karma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"karma\",\n placeholder: \"amt\",\n tons: () => modifyExp(\"intelligence\", 1)(100000),\n add: modifyKarma(1),\n subtract: modifyKarma(-1),\n reset: resetKarma()\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Stats.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Stats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Stats(props) {\n function modifyExp(stat, modifier) {\n return function (exp) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n\n break;\n\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n\n break;\n\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n\n break;\n\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n\n break;\n\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n\n break;\n\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n\n break;\n\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier) {\n return function (amt) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp() {\n props.player.gainHackingExp(bigNumber);\n props.player.gainStrengthExp(bigNumber);\n props.player.gainDefenseExp(bigNumber);\n props.player.gainDexterityExp(bigNumber);\n props.player.gainAgilityExp(bigNumber);\n props.player.gainCharismaExp(bigNumber);\n props.player.gainIntelligenceExp(bigNumber);\n props.player.updateSkillLevels();\n }\n\n function resetAllExp() {\n props.player.hacking_exp = 0;\n props.player.strength_exp = 0;\n props.player.defense_exp = 0;\n props.player.dexterity_exp = 0;\n props.player.agility_exp = 0;\n props.player.charisma_exp = 0;\n props.player.intelligence_exp = 0;\n props.player.updateSkillLevels();\n }\n\n function resetExperience(stat) {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma() {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence() {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence() {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Experience / Stats\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfExp\n }, \"Tons of exp\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllExp\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Hacking:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"hacking\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"hacking\", 1)(bigNumber),\n add: modifyExp(\"hacking\", 1),\n subtract: modifyExp(\"hacking\", -1),\n reset: resetExperience(\"hacking\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Strength:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"strength\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"strength\", 1)(bigNumber),\n add: modifyExp(\"strength\", 1),\n subtract: modifyExp(\"strength\", -1),\n reset: resetExperience(\"strength\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Defense:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"defense\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"defense\", 1)(bigNumber),\n add: modifyExp(\"defense\", 1),\n subtract: modifyExp(\"defense\", -1),\n reset: resetExperience(\"defense\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Dexterity:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"dexterity\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"dexterity\", 1)(bigNumber),\n add: modifyExp(\"dexterity\", 1),\n subtract: modifyExp(\"dexterity\", -1),\n reset: resetExperience(\"dexterity\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Agility:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"agility\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"agility\", 1)(bigNumber),\n add: modifyExp(\"agility\", 1),\n subtract: modifyExp(\"agility\", -1),\n reset: resetExperience(\"agility\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Charisma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"charisma\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"charisma\", 1)(bigNumber),\n add: modifyExp(\"charisma\", 1),\n subtract: modifyExp(\"charisma\", -1),\n reset: resetExperience(\"charisma\")\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Intelligence:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"intelligence\",\n placeholder: \"exp\",\n tons: () => modifyExp(\"intelligence\", 1)(bigNumber),\n add: modifyExp(\"intelligence\", 1),\n subtract: modifyExp(\"intelligence\", -1),\n reset: resetExperience(\"intelligence\")\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: enableIntelligence\n }, \"Enable\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: disableIntelligence\n }, \"Disable\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text text-center\"\n }, \"Karma:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"karma\",\n placeholder: \"amt\",\n tons: () => modifyExp(\"intelligence\", 1)(100000),\n add: modifyKarma(1),\n subtract: modifyKarma(-1),\n reset: resetKarma()\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Stats.tsx?"); /***/ }), /* 796 */, @@ -4791,7 +4791,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Adjuster */ 107);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/FormControl */ 1071);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/InputLabel */ 1072);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Factions(props) {\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Illuminati\");\n\n function setFactionDropdown(event) {\n setFaction(event.target.value);\n }\n\n function receiveInvite() {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n props.player.receiveInvite(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].name);\n }\n }\n\n function modifyFactionRep(modifier) {\n return function (reputation) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier) {\n return function (favor) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Factions\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Faction:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n id: \"factions-select\"\n }, \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n labelId: \"factions-select\",\n id: \"factions-dropdown\",\n className: \"dropdown exp-input\",\n onChange: setFactionDropdown,\n value: faction,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveAllInvites,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveInvite,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default.a, null)))\n }, Object.values(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]).map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: faction.name,\n value: faction.name\n }, faction.name)))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyFactionRep(1)(bigNumber),\n add: modifyFactionRep(1),\n subtract: modifyFactionRep(-1),\n reset: resetFactionRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyFactionFavor(1)(2000),\n add: modifyFactionFavor(1),\n subtract: modifyFactionFavor(-1),\n reset: resetFactionFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRep\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRep\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFactionFavor\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFactionFavor\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Factions.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Factions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Adjuster */ 107);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/FormControl */ 1074);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 457);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/icons-material/Reply */ 458);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/InputLabel */ 1075);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Factions(props) {\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Illuminati\");\n\n function setFactionDropdown(event) {\n setFaction(event.target.value);\n }\n\n function receiveInvite() {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n props.player.receiveInvite(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].name);\n }\n }\n\n function modifyFactionRep(modifier) {\n return function (reputation) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier) {\n return function (favor) {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor() {\n const fac = _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][faction];\n\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor() {\n for (const i in _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]) {\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"][i].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Factions\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Faction:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControl__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_InputLabel__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n id: \"factions-select\"\n }, \"Faction\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n labelId: \"factions-select\",\n id: \"factions-dropdown\",\n className: \"dropdown exp-input\",\n onChange: setFactionDropdown,\n value: faction,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveAllInvites,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_12___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: receiveInvite,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_13___default.a, null)))\n }, Object.values(_Faction_Factions__WEBPACK_IMPORTED_MODULE_8__[/* Factions */ \"a\"]).map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: faction.name,\n value: faction.name\n }, faction.name)))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyFactionRep(1)(bigNumber),\n add: modifyFactionRep(1),\n subtract: modifyFactionRep(-1),\n reset: resetFactionRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_7__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyFactionFavor(1)(2000),\n add: modifyFactionFavor(1),\n subtract: modifyFactionFavor(-1),\n reset: resetFactionFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRep\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRep\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFactionFavor\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFactionFavor\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Factions.tsx?"); /***/ }), /* 834 */ @@ -4803,7 +4803,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 456);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/Reply */ 457);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Clear */ 455);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Augmentations(props) {\n const [augmentation, setAugmentation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event) {\n setAugmentation(event.target.value);\n }\n\n function queueAug() {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs() {\n for (const i in _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]) {\n const augName = _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"][i];\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs() {\n props.player.augmentations = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Aug:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onChange: setAugmentationDropdown,\n value: augmentation,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAllAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAug,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default.a, null))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: clearAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default.a, null)))\n }, Object.values(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]).map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: aug,\n value: aug\n }, aug)))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Augmentations.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentations; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/icons-material/ReplyAll */ 457);\n/* harmony import */ var _mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/icons-material/Reply */ 458);\n/* harmony import */ var _mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Clear */ 456);\n/* harmony import */ var _mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11__);\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Augmentations(props) {\n const [augmentation, setAugmentation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event) {\n setAugmentation(event.target.value);\n }\n\n function queueAug() {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs() {\n for (const i in _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]) {\n const augName = _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"][i];\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs() {\n props.player.augmentations = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Aug:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onChange: setAugmentationDropdown,\n value: augmentation,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAllAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ReplyAll__WEBPACK_IMPORTED_MODULE_9___default.a, null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: queueAug,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Reply__WEBPACK_IMPORTED_MODULE_10___default.a, null))),\n endAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n onClick: clearAugs,\n size: \"large\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Clear__WEBPACK_IMPORTED_MODULE_11___default.a, null)))\n }, Object.values(_Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_6__[/* AugmentationNames */ \"a\"]).map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: aug,\n value: aug\n }, aug)))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Augmentations.tsx?"); /***/ }), /* 835 */ @@ -4815,7 +4815,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SourceFile/PlayerOwnedSourceFile */ 442);\n/* harmony import */ var _mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/ButtonGroup */ 582);\n\n\n\n\n\n\n\n // Update as additional BitNodes get implemented\n\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nfunction SourceFiles(props) {\n function setSF(sfN, sfLvl) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter(sf => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some(sf => sf.n === sfN)) {\n props.player.sourceFiles.push(new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__[/* PlayerOwnedSourceFile */ \"a\"](sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits() {\n props.player.exploits = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Source-Files\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Exploits:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: clearExploits\n }, \"Clear\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-all\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(3)\n }, \"3\")))), validSFN.map(i => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-\" + i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"SF-\", i, \":\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 3)\n }, \"3\")))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/SourceFiles.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SourceFiles; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SourceFile/PlayerOwnedSourceFile */ 443);\n/* harmony import */ var _mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/ButtonGroup */ 582);\n\n\n\n\n\n\n\n // Update as additional BitNodes get implemented\n\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];\nfunction SourceFiles(props) {\n function setSF(sfN, sfLvl) {\n return function () {\n if (sfLvl === 0) {\n props.player.sourceFiles = props.player.sourceFiles.filter(sf => sf.n !== sfN);\n return;\n }\n\n if (!props.player.sourceFiles.some(sf => sf.n === sfN)) {\n props.player.sourceFiles.push(new _SourceFile_PlayerOwnedSourceFile__WEBPACK_IMPORTED_MODULE_6__[/* PlayerOwnedSourceFile */ \"a\"](sfN, sfLvl));\n return;\n }\n\n for (let i = 0; i < props.player.sourceFiles.length; i++) {\n if (props.player.sourceFiles[i].n === sfN) {\n props.player.sourceFiles[i].lvl = sfLvl;\n }\n }\n };\n }\n\n function setAllSF(sfLvl) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits() {\n props.player.exploits = [];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Source-Files\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Exploits:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: clearExploits\n }, \"Clear\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-all\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setAllSF(3)\n }, \"3\")))), validSFN.map(i => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"sf-\" + i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"SF-\", i, \":\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ButtonGroup__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 0)\n }, \"0\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 1)\n }, \"1\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 2)\n }, \"2\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: setSF(i, 3)\n }, \"3\")))))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/SourceFiles.tsx?"); /***/ }), /* 836 */ @@ -4827,7 +4827,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\nfunction Programs(props) {\n const [program, setProgram] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"NUKE.exe\");\n\n function setProgramDropdown(event) {\n setProgram(event.target.value);\n }\n\n function addProgram() {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms() {\n for (const i in _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]) {\n if (!props.player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name)) {\n props.player.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name);\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Programs\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Program:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setProgramDropdown,\n value: program\n }, Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]).map(program => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: program.name,\n value: program.name\n }, program.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Add:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addProgram\n }, \"One\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addAllPrograms\n }, \"All\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Programs.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Programs; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Programs/Programs */ 54);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\nfunction Programs(props) {\n const [program, setProgram] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"NUKE.exe\");\n\n function setProgramDropdown(event) {\n setProgram(event.target.value);\n }\n\n function addProgram() {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms() {\n for (const i in _Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]) {\n if (!props.player.hasProgram(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name)) {\n props.player.getHomeComputer().programs.push(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"][i].name);\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Programs\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Program:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setProgramDropdown,\n value: program\n }, Object.values(_Programs_Programs__WEBPACK_IMPORTED_MODULE_7__[/* Programs */ \"a\"]).map(program => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: program.name,\n value: program.name\n }, program.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Add:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addProgram\n }, \"One\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addAllPrograms\n }, \"All\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Programs.tsx?"); /***/ }), /* 837 */ @@ -4839,7 +4839,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Servers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\n\n\nfunction Servers() {\n const [server, setServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"home\");\n\n function setServerDropdown(event) {\n setServer(event.target.value);\n }\n\n function rootServer() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const s = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.hackDifficulty = server.minDifficulty;\n }\n }\n\n function maxMoney() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.moneyAvailable = server.moneyMax;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Servers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Server:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-servers-dropdown\",\n className: \"dropdown\",\n onChange: setServerDropdown,\n value: server\n }, Object.values(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]).map(server => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: server.hostname,\n value: server.hostname\n }, server.hostname))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Root:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootServer\n }, \"Root one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootAllServers\n }, \"Root all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Security:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minSecurity\n }, \"Min one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minAllSecurity\n }, \"Min all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Money:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxMoney\n }, \"Max one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxAllMoney\n }, \"Max all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Servers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Servers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Hacknet/HacknetServer */ 84);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n\n\n\n\n\n\n\n\n\n\n\nfunction Servers() {\n const [server, setServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"home\");\n\n function setServerDropdown(event) {\n setServer(event.target.value);\n }\n\n function rootServer() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n\n function rootAllServers() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const s = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hasAdminRights = true;\n s.sshPortOpen = true;\n s.ftpPortOpen = true;\n s.smtpPortOpen = true;\n s.httpPortOpen = true;\n s.sqlPortOpen = true;\n s.openPortCount = 5;\n }\n }\n\n function minSecurity() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.hackDifficulty = server.minDifficulty;\n }\n }\n\n function maxMoney() {\n const s = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_9__[/* GetServerByHostname */ \"a\"])(server);\n if (s === null) return;\n if (s instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney() {\n for (const i in _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"][i];\n if (server instanceof _Hacknet_HacknetServer__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServer */ \"a\"]) continue;\n server.moneyAvailable = server.moneyMax;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Servers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Server:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-servers-dropdown\",\n className: \"dropdown\",\n onChange: setServerDropdown,\n value: server\n }, Object.values(_Server_AllServers__WEBPACK_IMPORTED_MODULE_7__[/* AllServers */ \"b\"]).map(server => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n key: server.hostname,\n value: server.hostname\n }, server.hostname))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Root:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootServer\n }, \"Root one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: rootAllServers\n }, \"Root all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Security:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minSecurity\n }, \"Min one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: minAllSecurity\n }, \"Min all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Money:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxMoney\n }, \"Max one\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: maxAllMoney\n }, \"Max all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Servers.tsx?"); /***/ }), /* 838 */ @@ -4851,7 +4851,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Companies() {\n const [company, setCompany] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ECorp\");\n\n function setCompanyDropdown(event) {\n setCompany(event.target.value);\n }\n\n function resetCompanyRep() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier) {\n return function (reputation) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier) {\n return function (favor) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].favor = 0;\n }\n\n function tonsOfRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Companies\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Company:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-companies-dropdown\",\n className: \"dropdown\",\n onChange: setCompanyDropdown,\n value: company\n }, Object.values(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]).map(company => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: company.name,\n value: company.name\n }, company.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyCompanyRep(1)(bigNumber),\n add: modifyCompanyRep(1),\n subtract: modifyCompanyRep(-1),\n reset: resetCompanyRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyCompanyFavor(1)(2000),\n add: modifyCompanyFavor(1),\n subtract: modifyCompanyFavor(-1),\n reset: resetCompanyFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRepCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRepCompanies\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFavorCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFavorCompanies\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Companies.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Companies; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\n\n\n\nconst bigNumber = 1e12;\nfunction Companies() {\n const [company, setCompany] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ECorp\");\n\n function setCompanyDropdown(event) {\n setCompany(event.target.value);\n }\n\n function resetCompanyRep() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier) {\n return function (reputation) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier) {\n return function (favor) {\n const c = _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company];\n\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor() {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][company].favor = 0;\n }\n\n function tonsOfRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies() {\n for (const c in _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]) {\n _Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"][c].favor = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Companies\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Company:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n colSpan: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n id: \"dev-companies-dropdown\",\n className: \"dropdown\",\n onChange: setCompanyDropdown,\n value: company\n }, Object.values(_Company_Companies__WEBPACK_IMPORTED_MODULE_7__[/* Companies */ \"a\"]).map(company => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n key: company.name,\n value: company.name\n }, company.name))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"reputation\",\n placeholder: \"amt\",\n tons: () => modifyCompanyRep(1)(bigNumber),\n add: modifyCompanyRep(1),\n subtract: modifyCompanyRep(-1),\n reset: resetCompanyRep\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_9__[/* Adjuster */ \"a\"], {\n label: \"favor\",\n placeholder: \"amt\",\n tons: () => modifyCompanyFavor(1)(2000),\n add: modifyCompanyFavor(1),\n subtract: modifyCompanyFavor(-1),\n reset: resetCompanyFavor\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Reputation:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfRepCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllRepCompanies\n }, \"Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"All Favor:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: tonsOfFavorCompanies\n }, \"Tons\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetAllFavorCompanies\n }, \"Reset\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Companies.tsx?"); /***/ }), /* 839 */ @@ -4863,7 +4863,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Bladeburner(props) {\n function modifyBladeburnerRank(modify) {\n return function (rank) {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, rank * modify);\n }\n };\n }\n\n function resetBladeburnerRank() {\n props.player.bladeburner.rank = 0;\n props.player.bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank() {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, bigNumber);\n }\n }\n\n function modifyBladeburnerCycles(modify) {\n return function (cycles) {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles = 0;\n }\n }\n\n function addTonsBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += bigNumber;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Bladeburner\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Rank:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"rank\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerRank,\n add: modifyBladeburnerRank(1),\n subtract: modifyBladeburnerRank(-1),\n reset: resetBladeburnerRank\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerCycles,\n add: modifyBladeburnerCycles(1),\n subtract: modifyBladeburnerCycles(-1),\n reset: resetBladeburnerCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Bladeburner.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Bladeburner; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Bladeburner(props) {\n function modifyBladeburnerRank(modify) {\n return function (rank) {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, rank * modify);\n }\n };\n }\n\n function resetBladeburnerRank() {\n props.player.bladeburner.rank = 0;\n props.player.bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank() {\n if (props.player.bladeburner) {\n props.player.bladeburner.changeRank(props.player, bigNumber);\n }\n }\n\n function modifyBladeburnerCycles(modify) {\n return function (cycles) {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles = 0;\n }\n }\n\n function addTonsBladeburnerCycles() {\n if (props.player.bladeburner) {\n props.player.bladeburner.storedCycles += bigNumber;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Bladeburner\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Rank:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"rank\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerRank,\n add: modifyBladeburnerRank(1),\n subtract: modifyBladeburnerRank(-1),\n reset: resetBladeburnerRank\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsBladeburnerCycles,\n add: modifyBladeburnerCycles(1),\n subtract: modifyBladeburnerCycles(-1),\n reset: resetBladeburnerCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Bladeburner.tsx?"); /***/ }), /* 840 */ @@ -4875,7 +4875,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Gang(props) {\n function addTonsGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify) {\n return function (cycles) {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Gang\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsGangCycles,\n add: modifyGangCycles(1),\n subtract: modifyGangCycles(-1),\n reset: resetGangCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Gang.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Gang; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Gang(props) {\n function addTonsGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify) {\n return function (cycles) {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles() {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Gang\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_5__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsGangCycles,\n add: modifyGangCycles(1),\n subtract: modifyGangCycles(-1),\n reset: resetGangCycles\n })))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Gang.tsx?"); /***/ }), /* 841 */ @@ -4887,7 +4887,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Corporation(props) {\n function addTonsCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.plus(1e99);\n }\n }\n\n function resetCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(props.player.corporation.funds);\n }\n }\n\n function addTonsCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify) {\n return function (cycles) {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n Object.keys(div.products).forEach(prod => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Corporation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addTonsCorporationFunds\n }, \"Tons of funds\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetCorporationFunds\n }, \"Reset funds\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsCorporationCycles,\n add: modifyCorporationCycles(1),\n subtract: modifyCorporationCycles(-1),\n reset: resetCorporationCycles\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: finishCorporationProducts\n }, \"Finish products\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addCorporationResearch\n }, \"Tons of research\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Corporation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Corporation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _Adjuster__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Adjuster */ 107);\n\n\n\n\n\n\n\nconst bigNumber = 1e27;\nfunction Corporation(props) {\n function addTonsCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.plus(1e99);\n }\n }\n\n function resetCorporationFunds() {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds.minus(props.player.corporation.funds);\n }\n }\n\n function addTonsCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify) {\n return function (cycles) {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles() {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n Object.keys(div.products).forEach(prod => {\n const product = div.products[prod];\n if (product === undefined) throw new Error(\"Impossible product undefined\");\n product.prog = 99.9;\n });\n });\n }\n\n function addCorporationResearch() {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach(div => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Corporation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addTonsCorporationFunds\n }, \"Tons of funds\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: resetCorporationFunds\n }, \"Reset funds\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Cycles:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Adjuster__WEBPACK_IMPORTED_MODULE_6__[/* Adjuster */ \"a\"], {\n label: \"cycles\",\n placeholder: \"amt\",\n tons: addTonsCorporationCycles,\n add: modifyCorporationCycles(1),\n subtract: modifyCorporationCycles(-1),\n reset: resetCorporationCycles\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: finishCorporationProducts\n }, \"Finish products\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: addCorporationResearch\n }, \"Tons of research\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Corporation.tsx?"); /***/ }), /* 842 */ @@ -4899,7 +4899,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContracts; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../CodingContractGenerator */ 288);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n\n\n\n\n\n\n\n\n\n\nfunction CodingContracts() {\n const [codingcontract, setCodingcontract] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Find Largest Prime Factor\");\n\n function setCodingcontractDropdown(event) {\n setCodingcontract(event.target.value);\n }\n\n function specificContract() {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateContract */ \"a\"])({\n problemType: codingcontract,\n server: \"home\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Coding Contracts\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContract */ \"b\"]\n }, \"Generate Random Contract\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContractOnHome */ \"c\"]\n }, \"Generate Random Contract on Home Comp\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setCodingcontractDropdown,\n value: codingcontract\n }, Object.values(_CodingContracts__WEBPACK_IMPORTED_MODULE_9__[/* CodingContractTypes */ \"d\"]).map(cc => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: cc.name,\n value: cc.name\n }, cc.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: specificContract\n }, \"Generate Specified Contract Type on Home Comp\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/CodingContracts.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CodingContracts; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../CodingContractGenerator */ 289);\n/* harmony import */ var _CodingContracts__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../CodingContracts */ 79);\n\n\n\n\n\n\n\n\n\n\nfunction CodingContracts() {\n const [codingcontract, setCodingcontract] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"Find Largest Prime Factor\");\n\n function setCodingcontractDropdown(event) {\n setCodingcontract(event.target.value);\n }\n\n function specificContract() {\n Object(_CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateContract */ \"a\"])({\n problemType: codingcontract,\n server: \"home\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Coding Contracts\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContract */ \"b\"]\n }, \"Generate Random Contract\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: _CodingContractGenerator__WEBPACK_IMPORTED_MODULE_8__[/* generateRandomContractOnHome */ \"c\"]\n }, \"Generate Random Contract on Home Comp\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onChange: setCodingcontractDropdown,\n value: codingcontract\n }, Object.values(_CodingContracts__WEBPACK_IMPORTED_MODULE_9__[/* CodingContractTypes */ \"d\"]).map(cc => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n key: cc.name,\n value: cc.name\n }, cc.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: specificContract\n }, \"Generate Specified Contract Type on Home Comp\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/CodingContracts.tsx?"); /***/ }), /* 843 */ @@ -4911,7 +4911,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../StockMarket/Stock */ 103);\n\n\n\n\n\n\n\n\n\n\n\nfunction StockMarket() {\n const [stockPrice, setStockPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stockSymbol, setStockSymbol] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function setStockPriceField(event) {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event) {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub) {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match = () => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol) {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"]) {\n if (_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"].hasOwnProperty(name)) {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"][name];\n\n if (stock instanceof _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__[/* Stock */ \"a\"] && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice() {\n if (!isNaN(stockPrice)) {\n processStocks(stock => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps() {\n const stocks = [];\n processStocks(stock => {\n stocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: stock.symbol\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, stock.symbol), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: stock.cap\n }))));\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Stock\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Price cap\")), stocks)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Stock Market\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Symbol:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"symbol/'all'\",\n onChange: setStockSymbolField\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Price:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"$$$\",\n onChange: setStockPriceField\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: doSetStockPrice\n }, \"Set\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Caps:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: viewStockCaps\n }, \"View stock caps\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/StockMarket.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarket; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../StockMarket/StockMarket */ 74);\n/* harmony import */ var _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../StockMarket/Stock */ 104);\n\n\n\n\n\n\n\n\n\n\n\nfunction StockMarket() {\n const [stockPrice, setStockPrice] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [stockSymbol, setStockSymbol] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function setStockPriceField(event) {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event) {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub) {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match = () => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol) {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name in _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"]) {\n if (_StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"].hasOwnProperty(name)) {\n const stock = _StockMarket_StockMarket__WEBPACK_IMPORTED_MODULE_9__[/* StockMarket */ \"a\"][name];\n\n if (stock instanceof _StockMarket_Stock__WEBPACK_IMPORTED_MODULE_10__[/* Stock */ \"a\"] && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice() {\n if (!isNaN(stockPrice)) {\n processStocks(stock => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps() {\n const stocks = [];\n processStocks(stock => {\n stocks.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: stock.symbol\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, stock.symbol), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: stock.cap\n }))));\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_8__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Stock\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"th\", null, \"Price cap\")), stocks)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Stock Market\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Symbol:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"symbol/'all'\",\n onChange: setStockSymbolField\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Price:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n placeholder: \"$$$\",\n onChange: setStockPriceField\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: doSetStockPrice\n }, \"Set\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Caps:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: viewStockCaps\n }, \"View stock caps\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/StockMarket.tsx?"); /***/ }), /* 844 */ @@ -4923,7 +4923,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeves; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\n\nfunction Sleeves(props) {\n function sleeveMaxAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Sleeves\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Shock:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveMaxAllShock\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveClearAllShock\n }, \"Clear all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Sync:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncMaxAll\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncClearAll\n }, \"Clear all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Sleeves.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Sleeves; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\n\nfunction Sleeves(props) {\n function sleeveMaxAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll() {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Sleeves\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Shock:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveMaxAllShock\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveClearAllShock\n }, \"Clear all\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, \"Sync:\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncMaxAll\n }, \"Max all\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: sleeveSyncClearAll\n }, \"Clear all\")))))));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/Sleeves.tsx?"); /***/ }), /* 845 */ @@ -4935,7 +4935,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TimeSkip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SaveObject */ 218);\n\n\n\n\n\n\n\nfunction TimeSkip(props) {\n function timeskip(time) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n _SaveObject__WEBPACK_IMPORTED_MODULE_6__[/* saveObject */ \"b\"].saveGame(props.engine.indexedDb);\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Time skip\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 1000)\n }, \"1 minute\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 60 * 1000)\n }, \"1 hour\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(24 * 60 * 60 * 1000)\n }, \"1 day\")));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/TimeSkip.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TimeSkip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _SaveObject__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../SaveObject */ 219);\n\n\n\n\n\n\n\nfunction TimeSkip(props) {\n function timeskip(time) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n _SaveObject__WEBPACK_IMPORTED_MODULE_6__[/* saveObject */ \"b\"].saveGame(props.engine.indexedDb);\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_4___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Time skip\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 1000)\n }, \"1 minute\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(60 * 60 * 1000)\n }, \"1 hour\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n onClick: timeskip(24 * 60 * 60 * 1000)\n }, \"1 day\")));\n}\n\n//# sourceURL=webpack:///./src/DevMenu/ui/TimeSkip.tsx?"); /***/ }), /* 846 */ @@ -4971,7 +4971,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 348);\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n props.bladeburner.city = city;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__[/* WorldMap */ \"a\"], {\n currentCity: props.bladeburner.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/TravelPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/WorldMap */ 350);\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n props.bladeburner.city = city;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in for your Bladeburner duties does not affect your location in the game otherwise.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_2__[/* WorldMap */ \"a\"], {\n currentCity: props.bladeburner.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/TravelPopup.tsx?"); /***/ }), /* 849 */ @@ -4995,7 +4995,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AllPages; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionPage */ 851);\n/* harmony import */ var _ContractPage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContractPage */ 854);\n/* harmony import */ var _OperationPage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OperationPage */ 857);\n/* harmony import */ var _BlackOpPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOpPage */ 860);\n/* harmony import */ var _SkillPage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SkillPage */ 863);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/Icons */ 215);\n\n\n\n\n\n\n\nfunction AllPages(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"General\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function Header(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: () => setPage(props.name),\n className: page !== props.name ? \"bladeburner-nav-button noselect\" : \"bladeburner-nav-button-inactive noselect\"\n }, props.name);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"General\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Contracts\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Operations\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"BlackOps\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Skills\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, page === \"General\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Contracts\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ContractPage__WEBPACK_IMPORTED_MODULE_2__[/* ContractPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Operations\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_OperationPage__WEBPACK_IMPORTED_MODULE_3__[/* OperationPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"BlackOps\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpPage__WEBPACK_IMPORTED_MODULE_4__[/* BlackOpPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Skills\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillPage__WEBPACK_IMPORTED_MODULE_5__[/* SkillPage */ \"a\"], {\n bladeburner: props.bladeburner\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* stealthIcon */ \"b\"], \" = This action requires stealth, \", _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* killIcon */ \"a\"], \" = This action involves retirement\"));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/AllPages.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AllPages; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionPage */ 851);\n/* harmony import */ var _ContractPage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ContractPage */ 854);\n/* harmony import */ var _OperationPage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./OperationPage */ 857);\n/* harmony import */ var _BlackOpPage__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BlackOpPage */ 860);\n/* harmony import */ var _SkillPage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SkillPage */ 863);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/Icons */ 216);\n\n\n\n\n\n\n\nfunction AllPages(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"General\");\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function Header(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: () => setPage(props.name),\n className: page !== props.name ? \"bladeburner-nav-button noselect\" : \"bladeburner-nav-button-inactive noselect\"\n }, props.name);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"General\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Contracts\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Operations\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"BlackOps\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Header, {\n name: \"Skills\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"block\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, page === \"General\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionPage__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Contracts\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ContractPage__WEBPACK_IMPORTED_MODULE_2__[/* ContractPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Operations\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_OperationPage__WEBPACK_IMPORTED_MODULE_3__[/* OperationPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"BlackOps\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpPage__WEBPACK_IMPORTED_MODULE_4__[/* BlackOpPage */ \"a\"], {\n bladeburner: props.bladeburner,\n player: props.player\n }), page === \"Skills\" && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SkillPage__WEBPACK_IMPORTED_MODULE_5__[/* SkillPage */ \"a\"], {\n bladeburner: props.bladeburner\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* stealthIcon */ \"b\"], \" = This action requires stealth, \", _data_Icons__WEBPACK_IMPORTED_MODULE_6__[/* killIcon */ \"a\"], \" = This action involves retirement\"));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/AllPages.tsx?"); /***/ }), /* 851 */ @@ -5019,7 +5019,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionElem */ 853);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../GeneralActions */ 200);\n\n\n\nfunction GeneralActionList(props) {\n const actions = [];\n\n for (const name in _GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"]) {\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"].hasOwnProperty(name)) {\n actions.push(_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"][name]);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, actions.map(action => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: action.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: action,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionList.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralActionElem */ 853);\n/* harmony import */ var _GeneralActions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../GeneralActions */ 201);\n\n\n\nfunction GeneralActionList(props) {\n const actions = [];\n\n for (const name in _GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"]) {\n if (_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"].hasOwnProperty(name)) {\n actions.push(_GeneralActions__WEBPACK_IMPORTED_MODULE_2__[/* GeneralActions */ \"a\"][name]);\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, actions.map(action => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: action.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralActionElem__WEBPACK_IMPORTED_MODULE_1__[/* GeneralActionElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: action,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionList.tsx?"); /***/ }), /* 853 */ @@ -5031,7 +5031,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\nfunction GeneralActionElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n const actionTime = function () {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n return 60;\n\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n\n return -1; // dead code\n }();\n\n const successChance = props.action.name === \"Recruitment\" ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1)) : -1;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][props.action.name];\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), successChance !== -1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(successChance * 100, 1), \"%\")));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralActionElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\nfunction GeneralActionElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n const actionTime = function () {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n return 60;\n\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n\n return -1; // dead code\n }();\n\n const successChance = props.action.name === \"Recruitment\" ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1)) : -1;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][props.action.name];\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), successChance !== -1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(successChance * 100, 1), \"%\")));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx?"); /***/ }), /* 854 */ @@ -5067,7 +5067,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\nfunction ContractElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Contract;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_6__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Contracts remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ContractElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\nfunction ContractElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Contract;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_7__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].ContractSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_6__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Contracts remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/ContractElem.tsx?"); /***/ }), /* 857 */ @@ -5103,7 +5103,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TeamSizePopup */ 458);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\n\n\nfunction OperationElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Operation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_8__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Operations remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OperationElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../data/Constants */ 44);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TeamSizePopup */ 459);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\n\n\nfunction OperationElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"][\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n const maxLevel = props.action.level >= props.action.maxLevel;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const autolevelCheckboxId = `bladeburner-${props.action.name}-autolevel-checkbox`;\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_1__[/* ActionTypes */ \"a\"].Operation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_6__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_7__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n function increaseLevel() {\n ++props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function decreaseLevel() {\n --props.action.level;\n if (isActive) props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onAutolevel(event) {\n props.action.autoLevel = event.target.checked;\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_9__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_2__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onStart,\n className: \"a-link-button\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n }\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.action.getSuccessesNeededForNextLevel(_data_Constants__WEBPACK_IMPORTED_MODULE_5__[/* BladeburnerConstants */ \"a\"].OperationSuccessesPerLevel), \" successes needed for next level\"), \"Level: \", props.action.level, \" / \", props.action.maxLevel), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: increaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${maxLevel ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: decreaseLevel,\n style: {\n padding: \"2px\",\n margin: \"2px\"\n },\n className: `tooltip ${props.action.level <= 1 ? \"a-link-button-inactive\" : \"a-link-button\"}`\n }, isActive && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"WARNING: changing the level will restart the Operation\"), \"\\u2193\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Estimated success chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_8__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_3__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Operations remaining: \", Math.floor(props.action.count), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Successes: \", props.action.successes, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Failures: \", props.action.failures), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n className: \"tooltip\",\n style: {\n color: \"white\"\n },\n htmlFor: autolevelCheckboxId\n }, \"Autolevel:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Automatically increase operation level when possible\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: autolevelCheckboxId,\n checked: props.action.autoLevel,\n onChange: onAutolevel\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/OperationElem.tsx?"); /***/ }), /* 860 */ @@ -5127,7 +5127,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BlackOperations */ 199);\n/* harmony import */ var _BlackOpElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BlackOpElem */ 862);\n\n\n\nfunction BlackOpList(props) {\n let blackops = [];\n\n for (const blackopName in _BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"].hasOwnProperty(blackopName)) {\n blackops.push(_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"][blackopName]);\n }\n }\n\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n blackops = blackops.filter((blackop, i) => !(props.bladeburner.blackops[blackops[i].name] == null && i !== 0 && props.bladeburner.blackops[blackops[i - 1].name] == null));\n blackops = blackops.reverse();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, blackops.map(blackop => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: blackop.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpElem__WEBPACK_IMPORTED_MODULE_2__[/* BlackOpElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: blackop,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpList.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BlackOperations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BlackOperations */ 200);\n/* harmony import */ var _BlackOpElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./BlackOpElem */ 862);\n\n\n\nfunction BlackOpList(props) {\n let blackops = [];\n\n for (const blackopName in _BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"]) {\n if (_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"].hasOwnProperty(blackopName)) {\n blackops.push(_BlackOperations__WEBPACK_IMPORTED_MODULE_1__[/* BlackOperations */ \"a\"][blackopName]);\n }\n }\n\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n blackops = blackops.filter((blackop, i) => !(props.bladeburner.blackops[blackops[i].name] == null && i !== 0 && props.bladeburner.blackops[blackops[i - 1].name] == null));\n blackops = blackops.reverse();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, blackops.map(blackop => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: blackop.name,\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlackOpElem__WEBPACK_IMPORTED_MODULE_2__[/* BlackOpElem */ \"a\"], {\n bladeburner: props.bladeburner,\n action: blackop,\n player: props.player\n }))));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpList.tsx?"); /***/ }), /* 862 */ @@ -5139,7 +5139,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 215);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TeamSizePopup */ 458);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SuccessChance */ 349);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n\n\n\n\n\n\n\n\n\nfunction BlackOpElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n\n if (isCompleted) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"block\"\n }\n }, props.action.name, \" (COMPLETED)\");\n }\n\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: hasReqdRank ? \"a-link-button\" : \"a-link-button-inactive\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n onClick: onStart\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n color: hasReqdRank ? \"white\" : \"red\"\n }\n }, \"Required Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.reqdRank, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Estimated Success Chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_7__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000)));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BlackOpElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/ActionTypes */ 33);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _data_Icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../data/Icons */ 216);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TeamSizePopup */ 459);\n/* harmony import */ var _SuccessChance__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./SuccessChance */ 351);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n\n\n\n\n\n\n\n\n\nfunction BlackOpElem(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n\n if (isCompleted) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"block\"\n }\n }, props.action.name, \" (COMPLETED)\");\n }\n\n const isActive = props.bladeburner.action.type === _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"][\"BlackOperation\"] && props.action.name === props.bladeburner.action.name;\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow, props.bladeburner.actionTimeToComplete);\n\n function onStart() {\n props.bladeburner.action.type = _data_ActionTypes__WEBPACK_IMPORTED_MODULE_2__[/* ActionTypes */ \"a\"].BlackOperation;\n props.bladeburner.action.name = props.action.name;\n props.bladeburner.startAction(props.player, props.bladeburner.action);\n setRerender(old => !old);\n }\n\n function onTeam() {\n const popupId = \"bladeburner-operation-set-team-size-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _TeamSizePopup__WEBPACK_IMPORTED_MODULE_6__[/* TeamSizePopup */ \"a\"], {\n bladeburner: props.bladeburner,\n action: props.action,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n }), \" (IN PROGRESS - \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(computedActionTimeCurrent, 0), \" /\", \" \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.bladeburner.actionTimeToComplete, 0), \")\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_8__[/* CopyableText */ \"b\"], {\n value: props.action.name\n })), isActive ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_3__[/* createProgressBarText */ \"a\"])({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete\n })) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: hasReqdRank ? \"a-link-button\" : \"a-link-button-inactive\",\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n onClick: onStart\n }, \"Start\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onTeam,\n style: {\n margin: \"3px\",\n padding: \"3px\"\n },\n className: \"a-link-button\"\n }, \"Set Team Size (Curr Size: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.teamCount, 0), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.action.desc\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n color: hasReqdRank ? \"white\" : \"red\"\n }\n }, \"Required Rank: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.action.reqdRank, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Estimated Success Chance: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SuccessChance__WEBPACK_IMPORTED_MODULE_7__[/* SuccessChance */ \"a\"], {\n chance: estimatedSuccessChance\n }), \" \", props.action.isStealth ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* stealthIcon */ \"b\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), props.action.isKill ? _data_Icons__WEBPACK_IMPORTED_MODULE_4__[/* killIcon */ \"a\"] : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Time Required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* convertTimeMsToTimeElapsedString */ \"b\"])(actionTime * 1000)));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BlackOpElem.tsx?"); /***/ }), /* 863 */ @@ -5175,7 +5175,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\nfunction SkillElem(props) {\n const skillName = props.skill.name;\n let currentLevel = 0;\n\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n\n const pointCost = props.skill.calculateCost(currentLevel);\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick() {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__[/* CopyableText */ \"b\"], {\n value: props.skill.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"3px\",\n padding: \"3px\"\n },\n className: canLevel && !maxLvl ? \"a-link-button\" : \"a-link-button-inactive\"\n }, \"Level\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Level: \", currentLevel), maxLvl ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n color: \"red\",\n display: \"block\"\n }\n }, \"MAX LEVEL\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Skill Points required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(pointCost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.skill.desc\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SkillElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n\n\n\nfunction SkillElem(props) {\n const skillName = props.skill.name;\n let currentLevel = 0;\n\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n\n const pointCost = props.skill.calculateCost(currentLevel);\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick() {\n if (props.bladeburner.skillPoints < pointCost) return;\n props.bladeburner.skillPoints -= pointCost;\n props.bladeburner.upgradeSkill(props.skill);\n props.onUpgrade();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_1__[/* CopyableText */ \"b\"], {\n value: props.skill.name\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n onClick: onClick,\n style: {\n display: \"inline-block\",\n margin: \"3px\",\n padding: \"3px\"\n },\n className: canLevel && !maxLvl ? \"a-link-button\" : \"a-link-button-inactive\"\n }, \"Level\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Level: \", currentLevel), maxLvl ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n color: \"red\",\n display: \"block\"\n }\n }, \"MAX LEVEL\") : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Skill Points required: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(pointCost, 0)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n },\n dangerouslySetInnerHTML: {\n __html: props.skill.desc\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/SkillElem.tsx?"); /***/ }), /* 866 */ @@ -5211,7 +5211,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangStats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../AllGangs */ 59);\n/* harmony import */ var _BonusTime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BonusTime */ 869);\n/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\n\n\n\n\n\n\n\n\nfunction GangStats(props) {\n const territoryMult = _AllGangs__WEBPACK_IMPORTED_MODULE_6__[/* AllGangs */ \"a\"][props.gang.facName].territory * 100;\n let territoryStr;\n\n if (territoryMult <= 0) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(100, 2);\n } else {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(territoryMult, 2);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Respect: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(props.gang.respect), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.gang.respectGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(props.gang.wanted), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.gang.wantedGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level Penalty: -\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])((1 - props.gang.getWantedPenalty()) * 100, 2), \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Penalty for respect and money gain rates due to Wanted Level\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Money gain rate: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: 5 * props.gang.moneyGainRate\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Territory: \", territoryStr, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The percentage of total territory your Gang controls\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Faction reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(_Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][props.gang.facName].playerReputation)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BonusTime__WEBPACK_IMPORTED_MODULE_7__[/* BonusTime */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangStats.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangStats; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _AllGangs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../AllGangs */ 59);\n/* harmony import */ var _BonusTime__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BonusTime */ 869);\n/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\n\n\n\n\n\n\n\n\nfunction GangStats(props) {\n const territoryMult = _AllGangs__WEBPACK_IMPORTED_MODULE_6__[/* AllGangs */ \"a\"][props.gang.facName].territory * 100;\n let territoryStr;\n\n if (territoryMult <= 0) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(100, 2);\n } else {\n territoryStr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])(territoryMult, 2);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Respect: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(props.gang.respect), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.gang.respectGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect affects the amount of money your gang members will earn, and also determines how much reputation you are earning with your gang's corresponding Faction.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(props.gang.wanted), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.gang.wantedGainRate), \" / sec)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Wanted Level Penalty: -\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_2__[/* formatNumber */ \"c\"])((1 - props.gang.getWantedPenalty()) * 100, 2), \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Penalty for respect and money gain rates due to Wanted Level\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Money gain rate: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: 5 * props.gang.moneyGainRate\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n display: \"inline-block\"\n }\n }, \"Territory: \", territoryStr, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The percentage of total territory your Gang controls\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Faction reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(_Faction_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][props.gang.facName].playerReputation)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BonusTime__WEBPACK_IMPORTED_MODULE_7__[/* BonusTime */ \"a\"], {\n gang: props.gang\n }));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangStats.tsx?"); /***/ }), /* 869 */ @@ -5247,7 +5247,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GangMemberUpgrades */ 154);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/upgrades */ 119);\n/**\n * React Component for the popup that manages gang members upgrades\n */\n\n\n\n\n\n\n\n\nfunction NextReveal(props) {\n const upgrades = Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n if (upgrades.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Next at \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: upgrades[0].cost\n }));\n}\n\nfunction GangMemberUpgradePanel(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function filterUpgrades(list, type) {\n return Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.lt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation);\n\n function purchasedUpgrade(upgName) {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: upgName,\n className: \"gang-owned-upgrade tooltip\"\n }, upg.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n function upgradeButton(upg, left = false) {\n function onClick() {\n props.member.buyUpgrade(upg, props.player, props.gang);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n key: upg.name,\n className: \"a-link-button tooltip\",\n style: {\n margin: \"2px\",\n padding: \"2px\",\n display: \"block\",\n fontSize: \"11px\"\n },\n onClick: onClick\n }, upg.name, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.gang.getUpgradeCost(upg),\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: left ? \"tooltiptextleft\" : \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, props.member.name, \"(\", props.member.task, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n fontSize: \"14px\",\n display: \"inline-block\",\n width: \"20%\"\n }\n }, \"Hack: \", props.member.hack, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.hack_mult * asc.hack, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Str: \", props.member.str, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.str_mult * asc.str, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Def: \", props.member.def, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.def_mult * asc.def, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dex: \", props.member.dex, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.dex_mult * asc.dex, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agi: \", props.member.agi, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.agi_mult * asc.agi, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cha: \", props.member.cha, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.cha_mult * asc.cha, 2), \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-owned-upgrades-div noselect\"\n }, \"Purchased Upgrades: \", props.member.upgrades.map(upg => purchasedUpgrade(upg)), props.member.augmentations.map(upg => purchasedUpgrade(upg))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Weapons\"), weaponUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Armor\"), armorUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Vehicles\"), vehicleUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Rootkits\"), rootkitUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\"), augUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation,\n player: props.player,\n upgrades: props.member.upgrades\n })));\n}\n\nfunction GangMemberUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function closePopup(ev) {\n if (ev.keyCode !== 27) return;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n window.addEventListener(\"keydown\", closePopup);\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => {\n clearInterval(id);\n window.removeEventListener(\"keydown\", closePopup);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n value: filter,\n placeholder: \"Filter gang member\",\n onChange: event => setFilter(event.target.value)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n marginLeft: \"6px\",\n display: \"inline-block\"\n }\n }, \"Discount: -\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(1 - 1 / props.gang.getDiscount()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.\")), props.gang.members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(GangMemberUpgradePanel, {\n key: member.name,\n player: props.player,\n gang: props.gang,\n member: member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberUpgradePopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GangMemberUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../GangMemberUpgrades */ 154);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_upgrades__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../data/upgrades */ 120);\n/**\n * React Component for the popup that manages gang members upgrades\n */\n\n\n\n\n\n\n\n\nfunction NextReveal(props) {\n const upgrades = Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.gt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== props.type) return false;\n if (props.upgrades.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n if (upgrades.length === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Next at \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: upgrades[0].cost\n }));\n}\n\nfunction GangMemberUpgradePanel(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function filterUpgrades(list, type) {\n return Object.keys(_GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"]).filter(upgName => {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n if (props.player.money.lt(props.gang.getUpgradeCost(upg))) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n }).map(upgName => _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName]);\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation);\n\n function purchasedUpgrade(upgName) {\n const upg = _GangMemberUpgrades__WEBPACK_IMPORTED_MODULE_3__[/* GangMemberUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: upgName,\n className: \"gang-owned-upgrade tooltip\"\n }, upg.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n function upgradeButton(upg, left = false) {\n function onClick() {\n props.member.buyUpgrade(upg, props.player, props.gang);\n setRerender(old => !old);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n key: upg.name,\n className: \"a-link-button tooltip\",\n style: {\n margin: \"2px\",\n padding: \"2px\",\n display: \"block\",\n fontSize: \"11px\"\n },\n onClick: onClick\n }, upg.name, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.gang.getUpgradeCost(upg),\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: left ? \"tooltiptextleft\" : \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: upg.desc\n }\n }));\n }\n\n const asc = {\n hack: props.member.calculateAscensionMult(props.member.hack_asc_points),\n str: props.member.calculateAscensionMult(props.member.str_asc_points),\n def: props.member.calculateAscensionMult(props.member.def_asc_points),\n dex: props.member.calculateAscensionMult(props.member.dex_asc_points),\n agi: props.member.calculateAscensionMult(props.member.agi_asc_points),\n cha: props.member.calculateAscensionMult(props.member.cha_asc_points)\n };\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n border: \"1px solid white\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, props.member.name, \"(\", props.member.task, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", {\n style: {\n fontSize: \"14px\",\n display: \"inline-block\",\n width: \"20%\"\n }\n }, \"Hack: \", props.member.hack, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.hack_mult * asc.hack, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Str: \", props.member.str, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.str_mult * asc.str, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Def: \", props.member.def, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.def_mult * asc.def, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dex: \", props.member.dex, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.dex_mult * asc.dex, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agi: \", props.member.agi, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.agi_mult * asc.agi, 2), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cha: \", props.member.cha, \" (x\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_1__[/* formatNumber */ \"c\"])(props.member.cha_mult * asc.cha, 2), \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"gang-owned-upgrades-div noselect\"\n }, \"Purchased Upgrades: \", props.member.upgrades.map(upg => purchasedUpgrade(upg)), props.member.augmentations.map(upg => purchasedUpgrade(upg))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Weapons\"), weaponUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Weapon,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Armor\"), armorUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Armor,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Vehicles\"), vehicleUpgrades.map(upg => upgradeButton(upg)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Vehicle,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Rootkits\"), rootkitUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Rootkit,\n player: props.player,\n upgrades: props.member.upgrades\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\",\n style: {\n width: \"20%\",\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Augmentations\"), augUpgrades.map(upg => upgradeButton(upg, true)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(NextReveal, {\n gang: props.gang,\n type: _data_upgrades__WEBPACK_IMPORTED_MODULE_6__[/* UpgradeType */ \"a\"].Augmentation,\n player: props.player,\n upgrades: props.member.upgrades\n })));\n}\n\nfunction GangMemberUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function closePopup(ev) {\n if (ev.keyCode !== 27) return;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n window.addEventListener(\"keydown\", closePopup);\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => {\n clearInterval(id);\n window.removeEventListener(\"keydown\", closePopup);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input noselect\",\n value: filter,\n placeholder: \"Filter gang member\",\n onChange: event => setFilter(event.target.value)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: {\n marginLeft: \"6px\",\n display: \"inline-block\"\n }\n }, \"Discount: -\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(1 - 1 / props.gang.getDiscount()), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext noselect\"\n }, \"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.\")), props.gang.members.map(member => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(GangMemberUpgradePanel, {\n key: member.name,\n player: props.player,\n gang: props.gang,\n member: member\n })));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/GangMemberUpgradePopup.tsx?"); /***/ }), /* 872 */ @@ -5307,7 +5307,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\n\n\n\n\nfunction TaskSelector(props) {\n const [currentTask, setCurrentTask] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.member.task);\n\n function onChange(event) {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = props.gang.getAllTaskNames();\n const data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: 5 * props.member.calculateMoneyGain(props.gang)\n })], [`Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.member.calculateRespectGain(props.gang))} / sec`], [`Wanted Level:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.member.calculateWantedLevelGain(props.gang))} / sec`], [`Total Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(props.member.earnedRespect)}`]];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n onChange: onChange,\n className: \"dropdown noselect\",\n value: currentTask\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: 0,\n value: \"---\"\n }, \"---\"), tasks.map((task, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: i + 1,\n value: task\n }, task))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__[/* StatsTable */ \"a\"])(data)));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/TaskSelector.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StatsTable */ 186);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\n\n\n\n\nfunction TaskSelector(props) {\n const [currentTask, setCurrentTask] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.member.task);\n\n function onChange(event) {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = props.gang.getAllTaskNames();\n const data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: 5 * props.member.calculateMoneyGain(props.gang)\n })], [`Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(5 * props.member.calculateRespectGain(props.gang))} / sec`], [`Wanted Level:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatWanted(5 * props.member.calculateWantedLevelGain(props.gang))} / sec`], [`Total Respect:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatRespect(props.member.earnedRespect)}`]];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n onChange: onChange,\n className: \"dropdown noselect\",\n value: currentTask\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: 0,\n value: \"---\"\n }, \"---\"), tasks.map((task, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: i + 1,\n value: task\n }, task))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_2__[/* StatsTable */ \"a\"])(data)));\n}\n\n//# sourceURL=webpack:///./src/Gang/ui/TaskSelector.tsx?"); /***/ }), /* 877 */ @@ -5463,7 +5463,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HireEmployeePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Employee */ 353);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\n\n\n\n\nfunction NameEmployeePopup(props) {\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function nameEmployee() {\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (props.office.employees[i].name === name) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You already have an employee with this nickname!\");\n return;\n }\n }\n\n props.employee.name = name;\n props.office.employees.push(props.employee);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) nameEmployee();\n }\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Give your employee a nickname!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n value: name,\n className: \"text-input\",\n type: \"text\",\n placeholder: \"Employee nickname\",\n onKeyDown: onKeyDown,\n onChange: onChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: nameEmployee\n }, \"Hire!\"));\n}\n\nfunction HireEmployeeButton(props) {\n function hire() {\n const popupId = \"cmpy-mgmt-name-employee-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(popupId, NameEmployeePopup, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n popupId: popupId,\n player: props.player,\n employee: props.employee\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n onClick: hire,\n className: \"cmpy-mgmt-find-employee-option\"\n }, \"Intelligence: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.int, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cha, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Experience: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.exp, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Creativity: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cre, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Efficiency: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.eff, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.employee.sal), \" \\\\ s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Create a popup that lets the player manage exports\nfunction HireEmployeePopup(props) {\n if (props.office.atCapacity()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); //Generate three random employees (meh, decent, amazing)\n\n const mult1 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(25, 50) / 100;\n const mult2 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(51, 75) / 100;\n const mult3 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const sal = _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp1 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult1,\n charisma: cha * mult1,\n experience: exp * mult1,\n creativity: cre * mult1,\n efficiency: eff * mult1,\n salary: sal * mult1\n });\n const emp2 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult2,\n charisma: cha * mult2,\n experience: exp * mult2,\n creativity: cre * mult2,\n efficiency: eff * mult2,\n salary: sal * mult2\n });\n const emp3 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult3,\n charisma: cha * mult3,\n experience: exp * mult3,\n creativity: cre * mult3,\n efficiency: eff * mult3,\n salary: sal * mult3\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Select one of the following candidates for hire:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp1,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp2,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp3,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/HireEmployeePopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HireEmployeePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/helpers/getRandomInt */ 18);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Employee__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Employee */ 355);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\n\n\n\n\nfunction NameEmployeePopup(props) {\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function nameEmployee() {\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (props.office.employees[i].name === name) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You already have an employee with this nickname!\");\n return;\n }\n }\n\n props.employee.name = name;\n props.office.employees.push(props.employee);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyDown(event) {\n if (event.keyCode === 13) nameEmployee();\n }\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Give your employee a nickname!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n value: name,\n className: \"text-input\",\n type: \"text\",\n placeholder: \"Employee nickname\",\n onKeyDown: onKeyDown,\n onChange: onChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: nameEmployee\n }, \"Hire!\"));\n}\n\nfunction HireEmployeeButton(props) {\n function hire() {\n const popupId = \"cmpy-mgmt-name-employee-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* createPopup */ \"a\"])(popupId, NameEmployeePopup, {\n rerender: props.rerender,\n office: props.office,\n corp: props.corp,\n popupId: popupId,\n player: props.player,\n employee: props.employee\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n onClick: hire,\n className: \"cmpy-mgmt-find-employee-option\"\n }, \"Intelligence: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.int, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cha, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Experience: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.exp, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Creativity: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.cre, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Efficiency: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_5__[/* formatNumber */ \"c\"])(props.employee.eff, 1), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(props.employee.sal), \" \\\\ s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Create a popup that lets the player manage exports\nfunction HireEmployeePopup(props) {\n if (props.office.atCapacity()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); //Generate three random employees (meh, decent, amazing)\n\n const mult1 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(25, 50) / 100;\n const mult2 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(51, 75) / 100;\n const mult3 = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(76, 100) / 100;\n const int = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cha = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const exp = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const cre = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const eff = Object(_utils_helpers_getRandomInt__WEBPACK_IMPORTED_MODULE_4__[/* getRandomInt */ \"a\"])(50, 100);\n const sal = _data_Constants__WEBPACK_IMPORTED_MODULE_3__[/* CorporationConstants */ \"a\"].EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n const emp1 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult1,\n charisma: cha * mult1,\n experience: exp * mult1,\n creativity: cre * mult1,\n efficiency: eff * mult1,\n salary: sal * mult1\n });\n const emp2 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult2,\n charisma: cha * mult2,\n experience: exp * mult2,\n creativity: cre * mult2,\n efficiency: eff * mult2,\n salary: sal * mult2\n });\n const emp3 = new _Employee__WEBPACK_IMPORTED_MODULE_6__[/* Employee */ \"a\"]({\n intelligence: int * mult3,\n charisma: cha * mult3,\n experience: exp * mult3,\n creativity: cre * mult3,\n efficiency: eff * mult3,\n salary: sal * mult3\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Select one of the following candidates for hire:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp1,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp2,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(HireEmployeeButton, {\n rerender: props.rerender,\n employee: emp3,\n office: props.office,\n corp: props.corp,\n popupId: props.popupId,\n player: props.player\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/HireEmployeePopup.tsx?"); /***/ }), /* 890 */ @@ -5487,7 +5487,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../IndustryUpgrades */ 290);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeProductPopup */ 892);\n/* harmony import */ var _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ResearchPopup */ 893);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\nfunction IndustryOverview(props) {\n function renderMakeProductButton() {\n let createProductButtonText = \"\";\n let createProductPopupText = \"\";\n\n switch (props.division.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Food:\n createProductButtonText = \"Build Restaurant\";\n createProductPopupText = \"Build and manage a new restaurant!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Tobacco:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new tobacco product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n createProductPopupText = \"Design and develop a new pharmaceutical drug!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Design and manufacture a new computer hardware product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Robotics:\n createProductButtonText = \"Design Robot\";\n createProductPopupText = \"Design and create a new robot or robotic system!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Software:\n createProductButtonText = \"Develop Software\";\n createProductPopupText = \"Develop a new piece of software!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Healthcare:\n createProductButtonText = \"Build Hospital\";\n createProductPopupText = \"Build and manage a new hospital!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].RealEstate:\n createProductButtonText = \"Develop Property\";\n createProductPopupText = \"Develop a new piece of real estate property!\";\n break;\n\n default:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new product!\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n createProductPopupText += \"

To begin developing a product, \" + \"first choose the city in which it will be designed. The stats of your employees \" + \"in the selected city affect the properties of the finished product, such as its \" + \"quality, performance, and durability.

\" + \"You can also choose to invest money in the design and marketing of \" + \"the product. Investing money in its design will result in a superior product. \" + \"Investing money in marketing the product will help the product's sales.\";\n const hasMaxProducts = props.division.hasMaximumNumberProducts();\n const className = hasMaxProducts ? \"a-link-button-inactive tooltip\" : \"std-button\";\n const buttonStyle = {\n margin: \"6px\",\n display: \"inline-block\"\n };\n\n function openMakeProductPopup() {\n const popupId = \"cmpy-mgmt-create-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* MakeProductPopup */ \"a\"], {\n popupText: createProductPopupText,\n division: props.division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return Object.keys(props.division.products).length === 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className + (shouldFlash() ? \" flashing-button\" : \"\"),\n onClick: openMakeProductPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, createProductButtonText, hasMaxProducts && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You have reached the maximum number of products: \", props.division.getMaximumNumberProducts()));\n }\n\n function renderText() {\n const vechain = props.corp.unlockUpgrades[4] === 1;\n const profit = props.division.lastCycleRevenue.minus(props.division.lastCycleExpenses).toNumber();\n let advertisingInfo = false;\n const advertisingFactors = props.division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n\n if (vechain) {\n advertisingInfo = true;\n }\n\n function productionMultHelpTipOnClick() {\n // Wrapper for createProgressBarText()\n // Converts the industry's \"effectiveness factors\"\n // into a graphic (string) depicting how high that effectiveness is\n function convertEffectFacToGraphic(fac) {\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__[/* createProgressBarText */ \"a\"])({\n progress: fac,\n totalTicks: 20\n });\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Owning Hardware, Robots, AI Cores, and Real Estate \" + \"can boost your Industry's production. The effect these \" + \"materials have on your production varies between Industries. \" + \"For example, Real Estate may be very effective for some Industries, \" + \"but ineffective for others.

\" + \"This division's production multiplier is calculated by summing \" + \"the individual production multiplier of each of its office locations. \" + \"This production multiplier is applied to each office. Therefore, it is \" + \"beneficial to expand into new cities as this can greatly increase the \" + \"production multiplier of your entire Division.

\" + \"Below are approximations for how effective each material is at boosting \" + \"this industry's production multiplier (Bigger bars = more effective):

\" + `Hardware:    ${convertEffectFacToGraphic(props.division.hwFac)}
` + `Robots:      ${convertEffectFacToGraphic(props.division.robFac)}
` + `AI Cores:    ${convertEffectFacToGraphic(props.division.aiFac)}
` + `Real Estate: ${convertEffectFacToGraphic(props.division.reFac)}`);\n }\n\n function openResearchPopup() {\n const popupId = \"corporation-research-popup-box\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__[/* ResearchPopup */ \"a\"], {\n industry: props.division,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Industry: \", props.division.type, \" (Corp Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.corp.funds.toNumber()\n }), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.awareness, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.popularity, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), advertisingInfo !== false && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Advertising Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(totalAdvertisingFac, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext cmpy-mgmt-advertising-info\"\n }, \"Total multiplier for this industrys sales due to its awareness and popularity\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(awarenessFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(popularityFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ratio Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(ratioFac, 0.85), \"0.000\"))), advertisingInfo, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Revenue: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleRevenue.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Expenses: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleExpenses.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Profit: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Production Multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.prodMult, \"0.00\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: productionMultHelpTipOnClick\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Scientific Research: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.sciResearch.qty, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Scientific Research increases the quality of the materials and products that you produce.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"help-tip\",\n onClick: openResearchPopup\n }, \"Research\"));\n }\n\n function renderUpgrades() {\n const upgrades = [];\n\n for (const index in _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"]) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"][index]; // AutoBrew research disables the Coffee upgrade\n\n if (props.division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n\n switch (i) {\n case 0:\n //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n\n default:\n cost = baseCost * Math.pow(priceMult, props.division.upgrades[i]);\n break;\n }\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n props.corp.funds = props.corp.funds.minus(cost);\n props.division.upgrade(upgrade, {\n corporation: props.corp,\n office: props.office\n });\n props.rerender();\n }\n\n upgrades.push(renderUpgrade({\n key: index,\n onClick: onClick,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, upgrade[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_10__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n })),\n tooltip: upgrade[5]\n }));\n }\n\n return upgrades;\n }\n\n function renderUpgrade(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n onClick: props.onClick,\n key: props.key\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n }\n\n const makeProductButton = renderMakeProductButton();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-overview-panel\"\n }, renderText(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", {\n className: \"industry-purchases-and-upgrades-header\"\n }, \"Purchases & Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), renderUpgrades(), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.division.makesProducts && makeProductButton);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOverview.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _IndustryData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../IndustryData */ 40);\n/* harmony import */ var _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../IndustryUpgrades */ 291);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MakeProductPopup */ 892);\n/* harmony import */ var _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ResearchPopup */ 893);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MoneyCost */ 93);\n// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\nfunction IndustryOverview(props) {\n function renderMakeProductButton() {\n let createProductButtonText = \"\";\n let createProductPopupText = \"\";\n\n switch (props.division.type) {\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Food:\n createProductButtonText = \"Build Restaurant\";\n createProductPopupText = \"Build and manage a new restaurant!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Tobacco:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new tobacco product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n createProductPopupText = \"Design and develop a new pharmaceutical drug!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Design and manufacture a new computer hardware product!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Robotics:\n createProductButtonText = \"Design Robot\";\n createProductPopupText = \"Design and create a new robot or robotic system!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Software:\n createProductButtonText = \"Develop Software\";\n createProductPopupText = \"Develop a new piece of software!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].Healthcare:\n createProductButtonText = \"Build Hospital\";\n createProductPopupText = \"Build and manage a new hospital!\";\n break;\n\n case _IndustryData__WEBPACK_IMPORTED_MODULE_1__[/* Industries */ \"a\"].RealEstate:\n createProductButtonText = \"Develop Property\";\n createProductPopupText = \"Develop a new piece of real estate property!\";\n break;\n\n default:\n createProductButtonText = \"Create Product\";\n createProductPopupText = \"Create a new product!\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n createProductPopupText += \"

To begin developing a product, \" + \"first choose the city in which it will be designed. The stats of your employees \" + \"in the selected city affect the properties of the finished product, such as its \" + \"quality, performance, and durability.

\" + \"You can also choose to invest money in the design and marketing of \" + \"the product. Investing money in its design will result in a superior product. \" + \"Investing money in marketing the product will help the product's sales.\";\n const hasMaxProducts = props.division.hasMaximumNumberProducts();\n const className = hasMaxProducts ? \"a-link-button-inactive tooltip\" : \"std-button\";\n const buttonStyle = {\n margin: \"6px\",\n display: \"inline-block\"\n };\n\n function openMakeProductPopup() {\n const popupId = \"cmpy-mgmt-create-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _MakeProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* MakeProductPopup */ \"a\"], {\n popupText: createProductPopupText,\n division: props.division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return Object.keys(props.division.products).length === 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className + (shouldFlash() ? \" flashing-button\" : \"\"),\n onClick: openMakeProductPopup,\n style: buttonStyle,\n disabled: props.corp.funds.lt(0)\n }, createProductButtonText, hasMaxProducts && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You have reached the maximum number of products: \", props.division.getMaximumNumberProducts()));\n }\n\n function renderText() {\n const vechain = props.corp.unlockUpgrades[4] === 1;\n const profit = props.division.lastCycleRevenue.minus(props.division.lastCycleExpenses).toNumber();\n let advertisingInfo = false;\n const advertisingFactors = props.division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n\n if (vechain) {\n advertisingInfo = true;\n }\n\n function productionMultHelpTipOnClick() {\n // Wrapper for createProgressBarText()\n // Converts the industry's \"effectiveness factors\"\n // into a graphic (string) depicting how high that effectiveness is\n function convertEffectFacToGraphic(fac) {\n return Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_5__[/* createProgressBarText */ \"a\"])({\n progress: fac,\n totalTicks: 20\n });\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"Owning Hardware, Robots, AI Cores, and Real Estate \" + \"can boost your Industry's production. The effect these \" + \"materials have on your production varies between Industries. \" + \"For example, Real Estate may be very effective for some Industries, \" + \"but ineffective for others.

\" + \"This division's production multiplier is calculated by summing \" + \"the individual production multiplier of each of its office locations. \" + \"This production multiplier is applied to each office. Therefore, it is \" + \"beneficial to expand into new cities as this can greatly increase the \" + \"production multiplier of your entire Division.

\" + \"Below are approximations for how effective each material is at boosting \" + \"this industry's production multiplier (Bigger bars = more effective):

\" + `Hardware:    ${convertEffectFacToGraphic(props.division.hwFac)}
` + `Robots:      ${convertEffectFacToGraphic(props.division.robFac)}
` + `AI Cores:    ${convertEffectFacToGraphic(props.division.aiFac)}
` + `Real Estate: ${convertEffectFacToGraphic(props.division.reFac)}`);\n }\n\n function openResearchPopup() {\n const popupId = \"corporation-research-popup-box\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _ResearchPopup__WEBPACK_IMPORTED_MODULE_7__[/* ResearchPopup */ \"a\"], {\n industry: props.division,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, \"Industry: \", props.division.type, \" (Corp Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.corp.funds.toNumber()\n }), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.awareness, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.popularity, \"0.000\"), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), advertisingInfo !== false && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Advertising Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(totalAdvertisingFac, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext cmpy-mgmt-advertising-info\"\n }, \"Total multiplier for this industrys sales due to its awareness and popularity\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Awareness Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(awarenessFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Popularity Bonus: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(popularityFac, 0.85), \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Ratio Multiplier: x\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(Math.pow(ratioFac, 0.85), \"0.000\"))), advertisingInfo, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Revenue: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleRevenue.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Expenses: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: props.division.lastCycleExpenses.toNumber()\n }), \" / s\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Profit: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_9__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Production Multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.prodMult, \"0.00\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"help-tip\",\n onClick: productionMultHelpTipOnClick\n }, \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Scientific Research: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].format(props.division.sciResearch.qty, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Scientific Research increases the quality of the materials and products that you produce.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"help-tip\",\n onClick: openResearchPopup\n }, \"Research\"));\n }\n\n function renderUpgrades() {\n const upgrades = [];\n\n for (const index in _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"]) {\n const upgrade = _IndustryUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* IndustryUpgrades */ \"a\"][index]; // AutoBrew research disables the Coffee upgrade\n\n if (props.division.hasResearch(\"AutoBrew\") && upgrade[4] === \"Coffee\") {\n continue;\n }\n\n const i = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n let cost = 0;\n\n switch (i) {\n case 0:\n //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n\n default:\n cost = baseCost * Math.pow(priceMult, props.division.upgrades[i]);\n break;\n }\n\n function onClick() {\n if (props.corp.funds.lt(cost)) return;\n props.corp.funds = props.corp.funds.minus(cost);\n props.division.upgrade(upgrade, {\n corporation: props.corp,\n office: props.office\n });\n props.rerender();\n }\n\n upgrades.push(renderUpgrade({\n key: index,\n onClick: onClick,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, upgrade[4], \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_10__[/* MoneyCost */ \"a\"], {\n money: cost,\n corp: props.corp\n })),\n tooltip: upgrade[5]\n }));\n }\n\n return upgrades;\n }\n\n function renderUpgrade(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-div tooltip\",\n onClick: props.onClick,\n key: props.key\n }, props.text, props.tooltip != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, props.tooltip));\n }\n\n const makeProductButton = renderMakeProductButton();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-industry-overview-panel\"\n }, renderText(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", {\n className: \"industry-purchases-and-upgrades-header\"\n }, \"Purchases & Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), renderUpgrades(), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.division.makesProducts && makeProductButton);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryOverview.tsx?"); /***/ }), /* 892 */ @@ -5524,7 +5524,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryWarehouse; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OfficeSpace */ 289);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Product */ 312);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Warehouse */ 175);\n/* harmony import */ var _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DiscontinueProductPopup */ 896);\n/* harmony import */ var _ExportPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExportPopup */ 897);\n/* harmony import */ var _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LimitProductProductionPopup */ 898);\n/* harmony import */ var _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MaterialMarketTaPopup */ 899);\n/* harmony import */ var _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SellMaterialPopup */ 900);\n/* harmony import */ var _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SellProductPopup */ 901);\n/* harmony import */ var _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PurchaseMaterialPopup */ 902);\n/* harmony import */ var _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ProductMarketTaPopup */ 903);\n/* harmony import */ var _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SmartSupplyPopup */ 904);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../utils/helpers/isString */ 82);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MoneyCost */ 93);\n/* harmony import */ var _Helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Helpers */ 905);\n/* harmony import */ var _IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./IndustryProductEquation */ 906);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Actions */ 53);\n// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Creates the UI for a single Product type\nfunction ProductComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const city = props.city;\n const product = props.product; // Numeraljs formatters\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\"); // Total product gain = production - sale\n\n const totalGain = product.data[city][1] - product.data[city][2]; // Sell button\n\n let sellButtonText;\n\n if (product.sllman[city][0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sllman[city][1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", product.sllman[city][1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.sllman[city][1], nfB), \")\");\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n if (product.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.marketTa2Price[city]\n }));\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.pCost + markupLimit\n }));\n } else if (product.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sCost)) {\n const sCost = product.sCost.replace(/MP/g, product.pCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.sCost\n }));\n }\n }\n\n function openSellProductPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__[/* SellProductPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n } // Limit Production button\n\n\n let limitProductionButtonText = \"Limit Production\";\n\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prdman[city][1], nf) + \")\";\n }\n\n function openLimitProductProdutionPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__[/* LimitProductProductionPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n }\n\n function openDiscontinueProductPopup() {\n const popupId = \"cmpy-mgmt-discontinue-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* DiscontinueProductPopup */ \"a\"], {\n rerender: props.rerender,\n product: product,\n industry: division,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openProductMarketTaPopup() {\n const popupId = \"cmpy-mgmt-marketta-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__[/* ProductMarketTaPopup */ \"a\"], {\n product: product,\n industry: division,\n popupId: popupId\n });\n } // Unfinished Product\n\n\n if (!product.fin) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Designing \", product.name, \" (req. Operations/Engineers in \", product.createCity, \")...\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prog, \"0.00\"), \"% complete\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasUpgradeDashboard && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, product.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][0], nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][1], nfB), \"/s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \" /s\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Rating: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rat, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.qlt, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Performance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.per, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Durability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dur, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Reliability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rel, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Aesthetics: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.aes, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Features: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.fea, nf), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Production Cost:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost / _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of the material cost it takes to create this Product.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Market Price: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n}\n\n// Creates the UI for a single Material type\nfunction MaterialComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n\n if (!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__[/* OfficeSpace */ \"a\"])) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n } // Numeraljs formatter\n\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n // Total gain or loss of this material (per second)\n\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp; // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n\n const tutorial = division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; // Purchase material button\n\n const purchaseButtonText = `Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB)})`;\n const purchaseButtonClass = tutorial ? \"std-button flashing-button tooltip\" : \"std-button\";\n\n function openPurchaseMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-purchase-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__[/* PurchaseMaterialPopup */ \"a\"], {\n mat: mat,\n industry: division,\n warehouse: warehouse,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openExportPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ExportPopup__WEBPACK_IMPORTED_MODULE_7__[/* ExportPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n } // Sell material button\n\n\n let sellButtonText;\n\n if (mat.sllman[0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sllman[1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", mat.sllman[1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sllman[1], nfB), \")\");\n }\n\n if (mat.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.marketTa2Price\n }));\n } else if (mat.marketTa1) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.bCost + markupLimit\n }));\n } else if (mat.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sCost)) {\n const sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.sCost\n }));\n }\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n function openSellMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-sell-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__[/* SellMaterialPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openMaterialMarketTaPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__[/* MaterialMarketTaPopup */ \"a\"], {\n mat: mat,\n industry: division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return props.division.prodMats.includes(props.mat.name) && !mat.sllman[0];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-material-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, mat.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qty, nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Buy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.prd, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Export: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.totalExp, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Import: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.imp, nfB), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"MP: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(mat.bCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Market Price: The price you would pay if you were to buy this material on the market\")), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qlt, \"0.00a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The quality of your material. Higher quality will lead to more sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: purchaseButtonClass,\n onClick: openPurchaseMaterialPopup,\n disabled: props.warehouse.smartSupplyEnabled && Object.keys(props.division.reqMats).includes(props.mat.name)\n }, purchaseButtonText, tutorial && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Purchase your required materials to get production started!\")), corp.unlockUpgrades[0] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openExportPopup\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${shouldFlash() ? \" flashing-button\" : \"\"}`,\n onClick: openSellMaterialPopup\n }, sellButtonText), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMaterialMarketTaPopup\n }, \"Market-TA\")));\n}\n\nfunction IndustryWarehouse(props) {\n function renderWarehouseUI() {\n if (props.warehouse === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); // General Storage information at the top\n\n const sizeUsageStyle = {\n color: props.warehouse.sizeUsed >= props.warehouse.size ? \"red\" : \"white\",\n margin: \"5px\"\n }; // Upgrade Warehouse size button\n\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = props.corp.funds.gt(sizeUpgradeCost);\n const upgradeWarehouseClass = canAffordUpgrade ? \"std-button\" : \"a-link-button-inactive\";\n\n function upgradeWarehouseOnClick() {\n if (props.division === null) return;\n if (props.warehouse === 0) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(props.corp, props.division);\n props.corp.funds = props.corp.funds.minus(sizeUpgradeCost);\n props.rerender();\n }\n\n function openSmartSupplyPopup() {\n if (props.warehouse === 0) return;\n const popupId = \"cmpy-mgmt-smart-supply-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__[/* SmartSupplyPopup */ \"a\"], {\n division: props.division,\n warehouse: props.warehouse,\n corp: props.corp,\n player: props.player,\n popupId: popupId\n });\n }\n\n const ratioLines = [];\n\n for (const matName in props.division.reqMats) {\n if (props.division.reqMats.hasOwnProperty(matName)) {\n const text = [\" *\", props.division.reqMats[matName], matName].join(\" \");\n ratioLines.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, text)));\n }\n } // Current State:\n\n\n let stateText;\n\n switch (props.division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n\n default:\n console.error(`Invalid state: ${props.division.state}`);\n break;\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_3__[/* Material */ \"a\"]) {\n // Only create UI for materials that are relevant for the industry\n if (Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__[/* isRelevantMaterial */ \"a\"])(matName, props.division)) {\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent, {\n rerender: props.rerender,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: matName,\n mat: props.warehouse.materials[matName],\n warehouse: props.warehouse\n }));\n }\n }\n } // Create React components for products\n\n\n const products = [];\n\n if (props.division.makesProducts && Object.keys(props.division.products).length > 0) {\n for (const productName in props.division.products) {\n const product = props.division.products[productName];\n\n if (product instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n products.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent, {\n rerender: props.rerender,\n player: props.player,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: productName,\n product: product\n }));\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: sizeUsageStyle\n }, \"Storage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.sizeUsed), \" /\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.size), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: props.warehouse.breakdown\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeWarehouseClass,\n onClick: upgradeWarehouseOnClick\n }, \"Upgrade Warehouse Size - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: sizeUpgradeCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This industry uses the following equation for it's production: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__[/* IndustryProductEquation */ \"a\"], {\n division: props.division\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"To get started with production, purchase your required materials or import them from another of your company's divisions.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, stateText), props.corp.unlockUpgrades[1] && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSmartSupplyPopup\n }, \"Configure Smart Supply\")), mats, products);\n }\n\n function purchaseWarehouse(division, city) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_22__[/* PurchaseWarehouse */ \"m\"])(props.corp, division, city);\n props.rerender();\n }\n\n if (props.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) {\n return renderWarehouseUI();\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => purchaseWarehouse(props.division, props.currentCity),\n disabled: props.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)\n }, \"Purchase Warehouse (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost,\n corp: props.corp\n }), \")\"));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryWarehouse.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryWarehouse; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../OfficeSpace */ 290);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Material */ 131);\n/* harmony import */ var _Product__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Product */ 314);\n/* harmony import */ var _Warehouse__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Warehouse */ 175);\n/* harmony import */ var _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DiscontinueProductPopup */ 896);\n/* harmony import */ var _ExportPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ExportPopup */ 897);\n/* harmony import */ var _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./LimitProductProductionPopup */ 898);\n/* harmony import */ var _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./MaterialMarketTaPopup */ 899);\n/* harmony import */ var _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./SellMaterialPopup */ 900);\n/* harmony import */ var _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./SellProductPopup */ 901);\n/* harmony import */ var _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./PurchaseMaterialPopup */ 902);\n/* harmony import */ var _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./ProductMarketTaPopup */ 903);\n/* harmony import */ var _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./SmartSupplyPopup */ 904);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../utils/helpers/isString */ 82);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _MoneyCost__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./MoneyCost */ 93);\n/* harmony import */ var _Helpers__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./Helpers */ 905);\n/* harmony import */ var _IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./IndustryProductEquation */ 906);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../Actions */ 53);\n// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// Creates the UI for a single Product type\nfunction ProductComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const city = props.city;\n const product = props.product; // Numeraljs formatters\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\"); // Total product gain = production - sale\n\n const totalGain = product.data[city][1] - product.data[city][2]; // Sell button\n\n let sellButtonText;\n\n if (product.sllman[city][0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sllman[city][1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", product.sllman[city][1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.sllman[city][1], nfB), \")\");\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n if (product.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.marketTa2Price[city]\n }));\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.pCost + markupLimit\n }));\n } else if (product.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(product.sCost)) {\n const sCost = product.sCost.replace(/MP/g, product.pCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: product.sCost\n }));\n }\n }\n\n function openSellProductPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellProductPopup__WEBPACK_IMPORTED_MODULE_11__[/* SellProductPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n } // Limit Production button\n\n\n let limitProductionButtonText = \"Limit Production\";\n\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prdman[city][1], nf) + \")\";\n }\n\n function openLimitProductProdutionPopup() {\n const popupId = \"cmpy-mgmt-limit-product-production-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _LimitProductProductionPopup__WEBPACK_IMPORTED_MODULE_8__[/* LimitProductProductionPopup */ \"a\"], {\n product: product,\n city: city,\n popupId: popupId\n });\n }\n\n function openDiscontinueProductPopup() {\n const popupId = \"cmpy-mgmt-discontinue-product-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _DiscontinueProductPopup__WEBPACK_IMPORTED_MODULE_6__[/* DiscontinueProductPopup */ \"a\"], {\n rerender: props.rerender,\n product: product,\n industry: division,\n corp: props.corp,\n popupId: popupId,\n player: props.player\n });\n }\n\n function openProductMarketTaPopup() {\n const popupId = \"cmpy-mgmt-marketta-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ProductMarketTaPopup__WEBPACK_IMPORTED_MODULE_13__[/* ProductMarketTaPopup */ \"a\"], {\n product: product,\n industry: division,\n popupId: popupId\n });\n } // Unfinished Product\n\n\n if (!product.fin) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Designing \", product.name, \" (req. Operations/Engineers in \", product.createCity, \")...\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.prog, \"0.00\"), \"% complete\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasUpgradeDashboard && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-product-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, product.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][0], nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][1], nfB), \"/s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.data[city][2], nfB), \" /s\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Rating: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rat, nf), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.qlt, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Performance: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.per, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Durability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dur, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Reliability: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.rel, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Aesthetics: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.aes, nf), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Features: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.fea, nf), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(product.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Production Cost:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost / _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].ProductProductionCostRatio), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of the material cost it takes to create this Product.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Est. Market Price: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(product.pCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"An estimate of how much consumers are willing to pay for this product. Setting the sale price above this may result in less sales. Setting the sale price below this may result in more sales.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSellProductPopup\n }, sellButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openLimitProductProdutionPopup\n }, limitProductionButtonText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openDiscontinueProductPopup\n }, \"Discontinue\"), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openProductMarketTaPopup\n }, \"Market-TA\")));\n}\n\n// Creates the UI for a single Material type\nfunction MaterialComponent(props) {\n const corp = props.corp;\n const division = props.division;\n const warehouse = props.warehouse;\n const city = props.city;\n const mat = props.mat;\n const markupLimit = mat.getMarkupLimit();\n const office = division.offices[city];\n\n if (!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_2__[/* OfficeSpace */ \"a\"])) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n } // Numeraljs formatter\n\n\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n // Total gain or loss of this material (per second)\n\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp; // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n\n const tutorial = division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0; // Purchase material button\n\n const purchaseButtonText = `Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB)})`;\n const purchaseButtonClass = tutorial ? \"std-button flashing-button tooltip\" : \"std-button\";\n\n function openPurchaseMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-purchase-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _PurchaseMaterialPopup__WEBPACK_IMPORTED_MODULE_12__[/* PurchaseMaterialPopup */ \"a\"], {\n mat: mat,\n industry: division,\n warehouse: warehouse,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openExportPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _ExportPopup__WEBPACK_IMPORTED_MODULE_7__[/* ExportPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n } // Sell material button\n\n\n let sellButtonText;\n\n if (mat.sllman[0]) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sllman[1])) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", mat.sllman[1], \")\");\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \"/\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sllman[1], nfB), \")\");\n }\n\n if (mat.marketTa2) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.marketTa2Price\n }));\n } else if (mat.marketTa1) {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.bCost + markupLimit\n }));\n } else if (mat.sCost) {\n if (Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_17__[/* isString */ \"a\"])(mat.sCost)) {\n const sCost = mat.sCost.replace(/MP/g, mat.bCost + \"\");\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: eval(sCost)\n }));\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, sellButtonText, \" @ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_18__[/* Money */ \"a\"], {\n money: mat.sCost\n }));\n }\n }\n } else {\n sellButtonText = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Sell (0.000/0.000)\");\n }\n\n function openSellMaterialPopup() {\n const popupId = \"cmpy-mgmt-material-sell-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellMaterialPopup__WEBPACK_IMPORTED_MODULE_10__[/* SellMaterialPopup */ \"a\"], {\n mat: mat,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function openMaterialMarketTaPopup() {\n const popupId = \"cmpy-mgmt-export-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _MaterialMarketTaPopup__WEBPACK_IMPORTED_MODULE_9__[/* MaterialMarketTaPopup */ \"a\"], {\n mat: mat,\n industry: division,\n corp: props.corp,\n popupId: popupId\n });\n }\n\n function shouldFlash() {\n return props.division.prodMats.includes(props.mat.name) && !mat.sllman[0];\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-material-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, mat.name, \": \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qty, nfB), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(totalGain, nfB), \"/s)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Buy: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.buy, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Prod: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.prd, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sell: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.sll, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Export: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.totalExp, nfB), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Import: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.imp, nfB), corp.unlockUpgrades[2] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[2] === 1 && \"Demand: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.dmd, nf), corp.unlockUpgrades[3] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), corp.unlockUpgrades[3] === 1 && \"Competition: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.cmp, nf))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"MP: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatMoney(mat.bCost), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Market Price: The price you would pay if you were to buy this material on the market\")), \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Quality: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].format(mat.qlt, \"0.00a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"The quality of your material. Higher quality will lead to more sales\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n display: \"inline-block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: purchaseButtonClass,\n onClick: openPurchaseMaterialPopup,\n disabled: props.warehouse.smartSupplyEnabled && Object.keys(props.division.reqMats).includes(props.mat.name)\n }, purchaseButtonText, tutorial && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Purchase your required materials to get production started!\")), corp.unlockUpgrades[0] === 1 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openExportPopup\n }, \"Export\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${shouldFlash() ? \" flashing-button\" : \"\"}`,\n onClick: openSellMaterialPopup\n }, sellButtonText), division.hasResearch(\"Market-TA.I\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMaterialMarketTaPopup\n }, \"Market-TA\")));\n}\n\nfunction IndustryWarehouse(props) {\n function renderWarehouseUI() {\n if (props.warehouse === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null); // General Storage information at the top\n\n const sizeUsageStyle = {\n color: props.warehouse.sizeUsed >= props.warehouse.size ? \"red\" : \"white\",\n margin: \"5px\"\n }; // Upgrade Warehouse size button\n\n const sizeUpgradeCost = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = props.corp.funds.gt(sizeUpgradeCost);\n const upgradeWarehouseClass = canAffordUpgrade ? \"std-button\" : \"a-link-button-inactive\";\n\n function upgradeWarehouseOnClick() {\n if (props.division === null) return;\n if (props.warehouse === 0) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(props.corp, props.division);\n props.corp.funds = props.corp.funds.minus(sizeUpgradeCost);\n props.rerender();\n }\n\n function openSmartSupplyPopup() {\n if (props.warehouse === 0) return;\n const popupId = \"cmpy-mgmt-smart-supply-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SmartSupplyPopup__WEBPACK_IMPORTED_MODULE_14__[/* SmartSupplyPopup */ \"a\"], {\n division: props.division,\n warehouse: props.warehouse,\n corp: props.corp,\n player: props.player,\n popupId: popupId\n });\n }\n\n const ratioLines = [];\n\n for (const matName in props.division.reqMats) {\n if (props.division.reqMats.hasOwnProperty(matName)) {\n const text = [\" *\", props.division.reqMats[matName], matName].join(\" \");\n ratioLines.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, text)));\n }\n } // Current State:\n\n\n let stateText;\n\n switch (props.division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n\n default:\n console.error(`Invalid state: ${props.division.state}`);\n break;\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_3__[/* Material */ \"a\"]) {\n // Only create UI for materials that are relevant for the industry\n if (Object(_Helpers__WEBPACK_IMPORTED_MODULE_20__[/* isRelevantMaterial */ \"a\"])(matName, props.division)) {\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MaterialComponent, {\n rerender: props.rerender,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: matName,\n mat: props.warehouse.materials[matName],\n warehouse: props.warehouse\n }));\n }\n }\n } // Create React components for products\n\n\n const products = [];\n\n if (props.division.makesProducts && Object.keys(props.division.products).length > 0) {\n for (const productName in props.division.products) {\n const product = props.division.products[productName];\n\n if (product instanceof _Product__WEBPACK_IMPORTED_MODULE_4__[/* Product */ \"a\"]) {\n products.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ProductComponent, {\n rerender: props.rerender,\n player: props.player,\n city: props.currentCity,\n corp: props.corp,\n division: props.division,\n key: productName,\n product: product\n }));\n }\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\",\n style: sizeUsageStyle\n }, \"Storage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.sizeUsed), \" /\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_15__[/* numeralWrapper */ \"a\"].formatBigNumber(props.warehouse.size), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: props.warehouse.breakdown\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeWarehouseClass,\n onClick: upgradeWarehouseOnClick\n }, \"Upgrade Warehouse Size - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: sizeUpgradeCost,\n corp: props.corp\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This industry uses the following equation for it's production: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_IndustryProductEquation__WEBPACK_IMPORTED_MODULE_21__[/* IndustryProductEquation */ \"a\"], {\n division: props.division\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"To get started with production, purchase your required materials or import them from another of your company's divisions.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, stateText), props.corp.unlockUpgrades[1] && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openSmartSupplyPopup\n }, \"Configure Smart Supply\")), mats, products);\n }\n\n function purchaseWarehouse(division, city) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_22__[/* PurchaseWarehouse */ \"m\"])(props.corp, division, city);\n props.rerender();\n }\n\n if (props.warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_5__[/* Warehouse */ \"a\"]) {\n return renderWarehouseUI();\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-warehouse-panel\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => purchaseWarehouse(props.division, props.currentCity),\n disabled: props.corp.funds.lt(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost)\n }, \"Purchase Warehouse (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MoneyCost__WEBPACK_IMPORTED_MODULE_19__[/* MoneyCost */ \"a\"], {\n money: _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CorporationConstants */ \"a\"].WarehouseInitialCost,\n corp: props.corp\n }), \")\"));\n }\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryWarehouse.tsx?"); /***/ }), /* 896 */ @@ -5632,7 +5632,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SmartSupplyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Material */ 130);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\nfunction Leftover(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event) {\n try {\n const material = props.warehouse.materials[props.matName];\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupplyUseLeftovers */ \"v\"])(props.warehouse, material, event.target.checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n setChecked(event.target.checked);\n }\n\n const matNameId = `${props.matName}-use-leftovers`;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: props.matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: matNameId\n }, props.warehouse.materials[props.matName].name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: matNameId,\n onChange: onChange,\n style: {\n margin: \"3px\"\n },\n checked: checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction SmartSupplyPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n } // Smart Supply Checkbox\n\n\n const smartSupplyCheckboxId = \"cmpy-mgmt-smart-supply-checkbox\";\n\n function smartSupplyOnChange(e) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupply */ \"u\"])(props.warehouse, e.target.checked);\n rerender();\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_2__[/* Material */ \"a\"])) continue;\n if (!Object.keys(props.division.reqMats).includes(matName)) continue;\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Leftover, {\n key: matName,\n warehouse: props.warehouse,\n matName: matName\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: smartSupplyCheckboxId\n }, \"Enable Smart Supply\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: smartSupplyCheckboxId,\n onChange: smartSupplyOnChange,\n style: {\n margin: \"3px\"\n },\n checked: props.warehouse.smartSupplyEnabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use materials already in the warehouse instead of buying new ones, if available:\"), mats);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SmartSupplyPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SmartSupplyPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Actions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Actions */ 53);\n/* harmony import */ var _Material__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Material */ 131);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\n\nfunction Leftover(props) {\n const [checked, setChecked] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(!!props.warehouse.smartSupplyUseLeftovers[props.matName]);\n\n function onChange(event) {\n try {\n const material = props.warehouse.materials[props.matName];\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupplyUseLeftovers */ \"v\"])(props.warehouse, material, event.target.checked);\n } catch (err) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(err + \"\");\n }\n\n setChecked(event.target.checked);\n }\n\n const matNameId = `${props.matName}-use-leftovers`;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: props.matName\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: matNameId\n }, props.warehouse.materials[props.matName].name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: matNameId,\n onChange: onChange,\n style: {\n margin: \"3px\"\n },\n checked: checked\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction SmartSupplyPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n } // Smart Supply Checkbox\n\n\n const smartSupplyCheckboxId = \"cmpy-mgmt-smart-supply-checkbox\";\n\n function smartSupplyOnChange(e) {\n Object(_Actions__WEBPACK_IMPORTED_MODULE_1__[/* SetSmartSupply */ \"u\"])(props.warehouse, e.target.checked);\n rerender();\n } // Create React components for materials\n\n\n const mats = [];\n\n for (const matName in props.warehouse.materials) {\n if (!(props.warehouse.materials[matName] instanceof _Material__WEBPACK_IMPORTED_MODULE_2__[/* Material */ \"a\"])) continue;\n if (!Object.keys(props.division.reqMats).includes(matName)) continue;\n mats.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Leftover, {\n key: matName,\n warehouse: props.warehouse,\n matName: matName\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"label\", {\n style: {\n color: \"white\"\n },\n htmlFor: smartSupplyCheckboxId\n }, \"Enable Smart Supply\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n id: smartSupplyCheckboxId,\n onChange: smartSupplyOnChange,\n style: {\n margin: \"3px\"\n },\n checked: props.warehouse.smartSupplyEnabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use materials already in the warehouse instead of buying new ones, if available:\"), mats);\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/SmartSupplyPopup.tsx?"); /***/ }), /* 905 */ @@ -5656,7 +5656,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryProductEquation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\nfunction IndustryProductEquation(props) {\n const reqs = [];\n\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n\n const prod = props.division.prodMats.slice();\n\n if (props.division.makesProducts) {\n prod.push(props.division.type);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_1__[/* MathComponent */ \"a\"], {\n display: false,\n tex: reqs.join(\"+\") + String.raw`\\Rightarrow` + prod.map(p => String.raw`1\\text{ }${p}`).join(\"+\")\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryProductEquation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return IndustryProductEquation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\nfunction IndustryProductEquation(props) {\n const reqs = [];\n\n for (const reqMat of Object.keys(props.division.reqMats)) {\n const reqAmt = props.division.reqMats[reqMat];\n if (reqAmt === undefined) continue;\n reqs.push(String.raw`${reqAmt}\\text{ }${reqMat}`);\n }\n\n const prod = props.division.prodMats.slice();\n\n if (props.division.makesProducts) {\n prod.push(props.division.type);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_1__[/* MathComponent */ \"a\"], {\n display: false,\n tex: reqs.join(\"+\") + String.raw`\\Rightarrow` + prod.map(p => String.raw`1\\text{ }${p}`).join(\"+\")\n }));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/IndustryProductEquation.tsx?"); /***/ }), /* 907 */, @@ -5672,7 +5672,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Overview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LevelableUpgrade */ 912);\n/* harmony import */ var _UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./UnlockUpgrade */ 913);\n/* harmony import */ var _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BribeFactionPopup */ 914);\n/* harmony import */ var _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SellSharesPopup */ 915);\n/* harmony import */ var _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BuybackSharesPopup */ 916);\n/* harmony import */ var _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IssueDividendsPopup */ 917);\n/* harmony import */ var _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./IssueNewSharesPopup */ 918);\n/* harmony import */ var _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FindInvestorsPopup */ 919);\n/* harmony import */ var _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GoPublicPopup */ 920);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/CorporationUnlockUpgrades */ 339);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../data/CorporationUpgrades */ 340);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n// React Component for displaying Corporation Overview info\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Overview({\n corp,\n player,\n rerender\n}) {\n const profit = corp.revenue.minus(corp.expenses).toNumber();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.funds.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Revenue: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.revenue.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Expenses: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.expenses.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Profits: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DividendsStats, {\n corp: corp,\n profit: profit\n }), \"Publicly Traded: \", corp.public ? \"Yes\" : \"No\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Owned Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.numShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Stock Price: \", corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.sharePrice\n }) : \"N/A\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Total Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Outstanding Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.issuedShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Private Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares - corp.issuedShares - corp.numShares, \"0.000a\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Production Multiplier: \",\n mult: corp.getProductionMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Storage Multiplier: \",\n mult: corp.getStorageMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Advertising Multiplier: \",\n mult: corp.getAdvertisingMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Creativity Multiplier: \",\n mult: corp.getEmployeeCreMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Charisma Multiplier: \",\n mult: corp.getEmployeeChaMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Intelligence Multiplier: \",\n mult: corp.getEmployeeIntMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Efficiency Multiplier: \",\n mult: corp.getEmployeeEffMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Sales Multiplier: \",\n mult: corp.getSalesMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Scientific Research Multiplier: \",\n mult: corp.getScientificResearchMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BonusTime, {\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"a-link-button\",\n display: \"inline-block\",\n onClick: () => corp.getStarterGuide(player),\n text: \"Getting Started Guide\",\n tooltip: \"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' \" + \"This is a .lit file that guides you through the beginning of setting up a Corporation and \" + \"provides some tips/pointers for helping you get started with managing it.\"\n }), corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PublicButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PrivateButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BribeButton, {\n corp: corp,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Upgrades, {\n corp: corp,\n player: player,\n rerender: rerender\n }));\n}\n\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({\n corp,\n player,\n rerender\n}) {\n function openFindInvestorsPopup() {\n const popupId = \"cmpy-mgmt-find-investors-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__[/* FindInvestorsPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openGoPublicPopup() {\n const popupId = \"cmpy-mgmt-go-public-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__[/* GoPublicPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsClassName = fundingAvailable ? \"std-button\" : \"a-link-button-inactive\";\n const findInvestorsTooltip = fundingAvailable ? \"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company\" : undefined;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: findInvestorsClassName,\n onClick: openFindInvestorsPopup,\n text: \"Find Investors\",\n tooltip: findInvestorsTooltip,\n display: \"inline-block\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n onClick: openGoPublicPopup,\n display: \"inline-block\",\n text: \"Go Public\",\n tooltip: \"Become a publicly traded and owned entity. Going public \" + \"involves issuing shares for an IPO. Once you are a public \" + \"company, your shares will be traded on the stock market.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Render the UI for Corporation upgrades\nfunction Upgrades({\n corp,\n player,\n rerender\n}) {\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Upgrades are unlocked once you create an industry.\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Unlocks \"), Object.values(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__[/* CorporationUnlockUpgrades */ \"a\"]).filter(upgrade => corp.unlockUpgrades[upgrade[0]] === 0).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgradeData: upgrade,\n key: upgrade[0]\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Upgrades \"), corp.upgrades.map((level, i) => _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__[/* CorporationUpgrades */ \"a\"][i]).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* LevelableUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgrade: upgrade,\n key: upgrade[0]\n })));\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({\n corp,\n player,\n rerender\n}) {\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesClass = sellSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const sellSharesTooltip = sellSharesOnCd ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown) : \"Sell your shares in the company. The money earned from selling your \" + \"shares goes into your personal account, not the Corporation's. \" + \"This is one of the only ways to profit from your business venture.\";\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesClass = issueNewSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const issueNewSharesTooltip = issueNewSharesOnCd ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown) : \"Issue new equity shares to raise capital.\";\n\n function openSellSharesPopup() {\n const popupId = \"cmpy-mgmt-sell-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__[/* SellSharesPopup */ \"a\"], {\n corp: corp,\n player,\n popupId,\n rerender\n });\n }\n\n function openBuybackSharesPopup() {\n const popupId = \"corp-buyback-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__[/* BuybackSharesPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openIssueNewSharesPopup() {\n const popupId = \"cmpy-mgmt-issue-new-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__[/* IssueNewSharesPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n function openIssueDividendsPopup() {\n const popupId = \"cmpy-mgmt-issue-dividends-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__[/* IssueDividendsPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: sellSharesClass,\n display: \"inline-block\",\n onClick: openSellSharesPopup,\n text: \"Sell Shares\",\n tooltip: sellSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openBuybackSharesPopup,\n text: \"Buyback shares\",\n tooltip: \"Buy back shares you that previously issued or sold at market price.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: issueNewSharesClass,\n display: \"inline-block\",\n onClick: openIssueNewSharesPopup,\n text: \"Issue New Shares\",\n tooltip: issueNewSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openIssueDividendsPopup,\n text: \"Issue Dividends\",\n tooltip: \"Manage the dividends that are paid out to shareholders (including yourself)\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n} // Generic Function for Creating a button\n\n\nfunction Button({\n className = \"std-button\",\n text,\n display,\n tooltip,\n onClick\n}) {\n const hasTooltip = tooltip != null;\n if (hasTooltip) className += \" tooltip\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: onClick,\n style: {\n display: display ? display : \"block\"\n }\n }, text, hasTooltip && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\nfunction BribeButton({\n player,\n corp\n}) {\n function openBribeFactionPopup() {\n const popupId = \"corp-bribe-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__[/* BribeFactionPopup */ \"a\"], {\n player,\n popupId,\n corp: corp\n });\n }\n\n const canBribe = corp.determineValuation() >= _data_Constants__WEBPACK_IMPORTED_MODULE_10__[/* CorporationConstants */ \"a\"].BribeThreshold || true;\n const bribeFactionsClass = canBribe ? \"a-link-button\" : \"a-link-button-inactive\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: bribeFactionsClass,\n display: \"inline-block\",\n onClick: openBribeFactionPopup,\n text: \"Bribe Factions\",\n tooltip: canBribe ? \"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation\" : \"Your Corporation is not powerful enough to bribe Faction leaders\"\n });\n}\n\nfunction DividendsStats({\n corp,\n profit\n}) {\n if (corp.dividendPercentage <= 0 || profit <= 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const totalDividends = corp.dividendPercentage / 100 * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n const playerEarnings = corp.numShares * dividendsPerShare;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Retained Profits (after dividends): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: retainedEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Percentage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.dividendPercentage / 100, \"0%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividends per share: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: dividendsPerShare\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Pre-Tax): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Tax Rate: \", corp.dividendTaxPercentage, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Post-Tax):\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings * (1 - corp.dividendTaxPercentage / 100)\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction Mult({\n name,\n mult\n}) {\n if (mult <= 1) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, name, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(mult, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime({\n corp\n}) {\n const storedTime = corp.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_13__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n if (storedTime <= 15000) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Bonus time: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__[/* convertTimeMsToTimeElapsedString */ \"b\"])(storedTime), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/Overview.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Overview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./LevelableUpgrade */ 912);\n/* harmony import */ var _UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./UnlockUpgrade */ 913);\n/* harmony import */ var _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./BribeFactionPopup */ 914);\n/* harmony import */ var _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./SellSharesPopup */ 915);\n/* harmony import */ var _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./BuybackSharesPopup */ 916);\n/* harmony import */ var _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./IssueDividendsPopup */ 917);\n/* harmony import */ var _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./IssueNewSharesPopup */ 918);\n/* harmony import */ var _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FindInvestorsPopup */ 919);\n/* harmony import */ var _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GoPublicPopup */ 920);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../data/Constants */ 35);\n/* harmony import */ var _data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../data/CorporationUnlockUpgrades */ 341);\n/* harmony import */ var _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../data/CorporationUpgrades */ 342);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n// React Component for displaying Corporation Overview info\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Overview({\n corp,\n player,\n rerender\n}) {\n const profit = corp.revenue.minus(corp.expenses).toNumber();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Total Funds: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.funds.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Revenue: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.revenue.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Expenses: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.expenses.toNumber()\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Total Profits: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: profit\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(DividendsStats, {\n corp: corp,\n profit: profit\n }), \"Publicly Traded: \", corp.public ? \"Yes\" : \"No\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Owned Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.numShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Stock Price: \", corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: corp.sharePrice\n }) : \"N/A\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Total Stock Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Outstanding Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.issuedShares, \"0.000a\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Private Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.totalShares - corp.issuedShares - corp.numShares, \"0.000a\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Production Multiplier: \",\n mult: corp.getProductionMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Storage Multiplier: \",\n mult: corp.getStorageMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Advertising Multiplier: \",\n mult: corp.getAdvertisingMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Creativity Multiplier: \",\n mult: corp.getEmployeeCreMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Charisma Multiplier: \",\n mult: corp.getEmployeeChaMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Intelligence Multiplier: \",\n mult: corp.getEmployeeIntMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Empl. Efficiency Multiplier: \",\n mult: corp.getEmployeeEffMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Sales Multiplier: \",\n mult: corp.getSalesMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Mult, {\n name: \"Scientific Research Multiplier: \",\n mult: corp.getScientificResearchMultiplier()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BonusTime, {\n corp: corp\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"a-link-button\",\n display: \"inline-block\",\n onClick: () => corp.getStarterGuide(player),\n text: \"Getting Started Guide\",\n tooltip: \"Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' \" + \"This is a .lit file that guides you through the beginning of setting up a Corporation and \" + \"provides some tips/pointers for helping you get started with managing it.\"\n }), corp.public ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PublicButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(PrivateButtons, {\n corp: corp,\n player: player,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BribeButton, {\n corp: corp,\n player: player\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Upgrades, {\n corp: corp,\n player: player,\n rerender: rerender\n }));\n}\n\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({\n corp,\n player,\n rerender\n}) {\n function openFindInvestorsPopup() {\n const popupId = \"cmpy-mgmt-find-investors-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _FindInvestorsPopup__WEBPACK_IMPORTED_MODULE_8__[/* FindInvestorsPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openGoPublicPopup() {\n const popupId = \"cmpy-mgmt-go-public-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _GoPublicPopup__WEBPACK_IMPORTED_MODULE_9__[/* GoPublicPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsClassName = fundingAvailable ? \"std-button\" : \"a-link-button-inactive\";\n const findInvestorsTooltip = fundingAvailable ? \"Search for private investors who will give you startup funding in exchangefor equity (stock shares) in your company\" : undefined;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: findInvestorsClassName,\n onClick: openFindInvestorsPopup,\n text: \"Find Investors\",\n tooltip: findInvestorsTooltip,\n display: \"inline-block\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n onClick: openGoPublicPopup,\n display: \"inline-block\",\n text: \"Go Public\",\n tooltip: \"Become a publicly traded and owned entity. Going public \" + \"involves issuing shares for an IPO. Once you are a public \" + \"company, your shares will be traded on the stock market.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Render the UI for Corporation upgrades\nfunction Upgrades({\n corp,\n player,\n rerender\n}) {\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Upgrades are unlocked once you create an industry.\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"cmpy-mgmt-upgrade-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Unlocks \"), Object.values(_data_CorporationUnlockUpgrades__WEBPACK_IMPORTED_MODULE_11__[/* CorporationUnlockUpgrades */ \"a\"]).filter(upgrade => corp.unlockUpgrades[upgrade[0]] === 0).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_UnlockUpgrade__WEBPACK_IMPORTED_MODULE_2__[/* UnlockUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgradeData: upgrade,\n key: upgrade[0]\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"cmpy-mgmt-upgrade-header\"\n }, \" Upgrades \"), corp.upgrades.map((level, i) => _data_CorporationUpgrades__WEBPACK_IMPORTED_MODULE_12__[/* CorporationUpgrades */ \"a\"][i]).map(upgrade => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LevelableUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* LevelableUpgrade */ \"a\"], {\n rerender: rerender,\n player: player,\n corp: corp,\n upgrade: upgrade,\n key: upgrade[0]\n })));\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({\n corp,\n player,\n rerender\n}) {\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesClass = sellSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const sellSharesTooltip = sellSharesOnCd ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown) : \"Sell your shares in the company. The money earned from selling your \" + \"shares goes into your personal account, not the Corporation's. \" + \"This is one of the only ways to profit from your business venture.\";\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesClass = issueNewSharesOnCd ? \"a-link-button-inactive\" : \"std-button\";\n const issueNewSharesTooltip = issueNewSharesOnCd ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown) : \"Issue new equity shares to raise capital.\";\n\n function openSellSharesPopup() {\n const popupId = \"cmpy-mgmt-sell-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _SellSharesPopup__WEBPACK_IMPORTED_MODULE_4__[/* SellSharesPopup */ \"a\"], {\n corp: corp,\n player,\n popupId,\n rerender\n });\n }\n\n function openBuybackSharesPopup() {\n const popupId = \"corp-buyback-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BuybackSharesPopup__WEBPACK_IMPORTED_MODULE_5__[/* BuybackSharesPopup */ \"a\"], {\n rerender,\n player,\n popupId,\n corp: corp\n });\n }\n\n function openIssueNewSharesPopup() {\n const popupId = \"cmpy-mgmt-issue-new-shares-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueNewSharesPopup__WEBPACK_IMPORTED_MODULE_7__[/* IssueNewSharesPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n function openIssueDividendsPopup() {\n const popupId = \"cmpy-mgmt-issue-dividends-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _IssueDividendsPopup__WEBPACK_IMPORTED_MODULE_6__[/* IssueDividendsPopup */ \"a\"], {\n popupId,\n corp: corp\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: sellSharesClass,\n display: \"inline-block\",\n onClick: openSellSharesPopup,\n text: \"Sell Shares\",\n tooltip: sellSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openBuybackSharesPopup,\n text: \"Buyback shares\",\n tooltip: \"Buy back shares you that previously issued or sold at market price.\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: issueNewSharesClass,\n display: \"inline-block\",\n onClick: openIssueNewSharesPopup,\n text: \"Issue New Shares\",\n tooltip: issueNewSharesTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: \"std-button\",\n display: \"inline-block\",\n onClick: openIssueDividendsPopup,\n text: \"Issue Dividends\",\n tooltip: \"Manage the dividends that are paid out to shareholders (including yourself)\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n} // Generic Function for Creating a button\n\n\nfunction Button({\n className = \"std-button\",\n text,\n display,\n tooltip,\n onClick\n}) {\n const hasTooltip = tooltip != null;\n if (hasTooltip) className += \" tooltip\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: onClick,\n style: {\n display: display ? display : \"block\"\n }\n }, text, hasTooltip && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, tooltip));\n}\n\nfunction BribeButton({\n player,\n corp\n}) {\n function openBribeFactionPopup() {\n const popupId = \"corp-bribe-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_16__[/* createPopup */ \"a\"])(popupId, _BribeFactionPopup__WEBPACK_IMPORTED_MODULE_3__[/* BribeFactionPopup */ \"a\"], {\n player,\n popupId,\n corp: corp\n });\n }\n\n const canBribe = corp.determineValuation() >= _data_Constants__WEBPACK_IMPORTED_MODULE_10__[/* CorporationConstants */ \"a\"].BribeThreshold || true;\n const bribeFactionsClass = canBribe ? \"a-link-button\" : \"a-link-button-inactive\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Button, {\n className: bribeFactionsClass,\n display: \"inline-block\",\n onClick: openBribeFactionPopup,\n text: \"Bribe Factions\",\n tooltip: canBribe ? \"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation\" : \"Your Corporation is not powerful enough to bribe Faction leaders\"\n });\n}\n\nfunction DividendsStats({\n corp,\n profit\n}) {\n if (corp.dividendPercentage <= 0 || profit <= 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const totalDividends = corp.dividendPercentage / 100 * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n const playerEarnings = corp.numShares * dividendsPerShare;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Retained Profits (after dividends): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: retainedEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Percentage: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(corp.dividendPercentage / 100, \"0%\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividends per share: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: dividendsPerShare\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Pre-Tax): \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dividend Tax Rate: \", corp.dividendTaxPercentage, \"%\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Your earnings as a shareholder (Post-Tax):\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_17__[/* Money */ \"a\"], {\n money: playerEarnings * (1 - corp.dividendTaxPercentage / 100)\n }), \" / s\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction Mult({\n name,\n mult\n}) {\n if (mult <= 1) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, name, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].format(mult, \"0.000\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime({\n corp\n}) {\n const storedTime = corp.storedCycles * _Constants__WEBPACK_IMPORTED_MODULE_13__[/* CONSTANTS */ \"a\"].MilliPerCycle;\n if (storedTime <= 15000) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Bonus time: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_15__[/* convertTimeMsToTimeElapsedString */ \"b\"])(storedTime), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/Overview.tsx?"); /***/ }), /* 912 */ @@ -5804,7 +5804,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Intro; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n\n\n\n\nfunction arrowPart(color, length) {\n let arrow = \"\";\n if (length <= 0) length = 0;else if (length > 13) length = 13;else {\n length--;\n arrow = \">\";\n }\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: color\n }\n }, \"=\".repeat(length), arrow, \" \".repeat(13 - arrow.length - length));\n}\n\nfunction coloredArrow(difficulty) {\n if (difficulty === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: \"white\"\n }\n }, \">\", \" \".repeat(38));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, arrowPart(\"white\", difficulty * 13), arrowPart(\"orange\", (difficulty - 1) * 13), arrowPart(\"red\", (difficulty - 2) * 13));\n }\n}\n\nfunction Intro(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Infiltrating \", props.Location)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Maximum level: \", props.MaxLevel)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"[\", coloredArrow(props.Difficulty), \"]\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` ^ ^ ^ ^`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` Trivial Normal Hard Impossible`)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"The minigames you play are randomly selected. It might take you few tries to get used to them.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"No game require use of the mouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spacebar is the default action/confirm button.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Everything that uses arrow can also use WASD\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Sometimes the rest of the keyboard is used.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.start,\n text: \"Start\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.cancel,\n text: \"Cancel\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Intro.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Intro; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\n\n\nfunction arrowPart(color, length) {\n let arrow = \"\";\n if (length <= 0) length = 0;else if (length > 13) length = 13;else {\n length--;\n arrow = \">\";\n }\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: color\n }\n }, \"=\".repeat(length), arrow, \" \".repeat(13 - arrow.length - length));\n}\n\nfunction coloredArrow(difficulty) {\n if (difficulty === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n color: \"white\"\n }\n }, \">\", \" \".repeat(38));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, arrowPart(\"white\", difficulty * 13), arrowPart(\"orange\", (difficulty - 1) * 13), arrowPart(\"red\", (difficulty - 2) * 13));\n }\n}\n\nfunction Intro(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Infiltrating \", props.Location)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Maximum level: \", props.MaxLevel)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"[\", coloredArrow(props.Difficulty), \"]\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` ^ ^ ^ ^`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, ` Trivial Normal Hard Impossible`)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Infiltration is a series of short minigames that get progressively harder. You take damage for failing them. Reaching the maximum level rewards you with intel you can trade for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"The minigames you play are randomly selected. It might take you few tries to get used to them.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"No game require use of the mouse.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spacebar is the default action/confirm button.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Everything that uses arrow can also use WASD\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Sometimes the rest of the keyboard is used.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.start,\n text: \"Start\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: props.cancel,\n text: \"Cancel\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Intro.tsx?"); /***/ }), /* 923 */ @@ -5816,7 +5816,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Countdown */ 924);\n/* harmony import */ var _BracketGame__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BracketGame */ 925);\n/* harmony import */ var _SlashGame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SlashGame */ 927);\n/* harmony import */ var _BackwardGame__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackwardGame */ 928);\n/* harmony import */ var _BribeGame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BribeGame */ 929);\n/* harmony import */ var _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CheatCodeGame */ 930);\n/* harmony import */ var _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Cyberpunk2077Game */ 931);\n/* harmony import */ var _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MinesweeperGame */ 932);\n/* harmony import */ var _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./WireCuttingGame */ 933);\n/* harmony import */ var _Victory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Victory */ 934);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Stage;\n\n(function (Stage) {\n Stage[Stage[\"Countdown\"] = 0] = \"Countdown\";\n Stage[Stage[\"Minigame\"] = 1] = \"Minigame\";\n Stage[Stage[\"Result\"] = 2] = \"Result\";\n Stage[Stage[\"Sell\"] = 3] = \"Sell\";\n})(Stage || (Stage = {}));\n\nconst minigames = [_SlashGame__WEBPACK_IMPORTED_MODULE_5__[/* SlashGame */ \"a\"], _BracketGame__WEBPACK_IMPORTED_MODULE_4__[/* BracketGame */ \"a\"], _BackwardGame__WEBPACK_IMPORTED_MODULE_6__[/* BackwardGame */ \"a\"], _BribeGame__WEBPACK_IMPORTED_MODULE_7__[/* BribeGame */ \"a\"], _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__[/* CheatCodeGame */ \"a\"], _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__[/* Cyberpunk2077Game */ \"a\"], _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__[/* MinesweeperGame */ \"a\"], _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__[/* WireCuttingGame */ \"a\"]];\nfunction Game(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Router();\n const [level, setLevel] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(1);\n const [stage, setStage] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(Stage.Countdown);\n const [results, setResults] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"\");\n const [gameIds, setGameIds] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length)\n });\n\n function nextGameId() {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n\n return id;\n }\n\n function setupNextGame() {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId()\n });\n }\n\n function success() {\n pushResult(true);\n\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n\n setupNextGame();\n }\n\n function pushResult(win) {\n setResults(old => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options) {\n setStage(Stage.Countdown);\n pushResult(false); // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n\n const damage = options !== null && options !== void 0 && options.automated ? player.hp : props.StartingDifficulty * 3;\n\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n\n setupNextGame();\n }\n\n let stageComponent;\n\n switch (stage) {\n case Stage.Countdown:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Countdown__WEBPACK_IMPORTED_MODULE_3__[/* Countdown */ \"a\"], {\n onFinish: () => setStage(Stage.Minigame)\n });\n break;\n\n case Stage.Minigame:\n {\n const MiniGame = minigames[gameIds.id];\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MiniGame, {\n onSuccess: success,\n onFailure: failure,\n difficulty: props.Difficulty + level / 50\n });\n break;\n }\n\n case Stage.Sell:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Victory__WEBPACK_IMPORTED_MODULE_12__[/* Victory */ \"a\"], {\n StartingDifficulty: props.StartingDifficulty,\n Difficulty: props.Difficulty,\n MaxLevel: props.MaxLevel\n });\n break;\n }\n\n function Progress() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h4\", null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", {\n style: {\n color: \"gray\"\n }\n }, results.slice(0, results.length - 1)), results[results.length - 1]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h3\", null, \"Level: \", level, \"\\xA0/\\xA0\", props.MaxLevel), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Progress, null)), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, stageComponent)));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Game.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Game; });\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _Countdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Countdown */ 924);\n/* harmony import */ var _BracketGame__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./BracketGame */ 925);\n/* harmony import */ var _SlashGame__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./SlashGame */ 927);\n/* harmony import */ var _BackwardGame__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BackwardGame */ 928);\n/* harmony import */ var _BribeGame__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./BribeGame */ 929);\n/* harmony import */ var _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./CheatCodeGame */ 930);\n/* harmony import */ var _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Cyberpunk2077Game */ 931);\n/* harmony import */ var _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./MinesweeperGame */ 932);\n/* harmony import */ var _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./WireCuttingGame */ 933);\n/* harmony import */ var _Victory__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./Victory */ 934);\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar Stage;\n\n(function (Stage) {\n Stage[Stage[\"Countdown\"] = 0] = \"Countdown\";\n Stage[Stage[\"Minigame\"] = 1] = \"Minigame\";\n Stage[Stage[\"Result\"] = 2] = \"Result\";\n Stage[Stage[\"Sell\"] = 3] = \"Sell\";\n})(Stage || (Stage = {}));\n\nconst minigames = [_SlashGame__WEBPACK_IMPORTED_MODULE_5__[/* SlashGame */ \"a\"], _BracketGame__WEBPACK_IMPORTED_MODULE_4__[/* BracketGame */ \"a\"], _BackwardGame__WEBPACK_IMPORTED_MODULE_6__[/* BackwardGame */ \"a\"], _BribeGame__WEBPACK_IMPORTED_MODULE_7__[/* BribeGame */ \"a\"], _CheatCodeGame__WEBPACK_IMPORTED_MODULE_8__[/* CheatCodeGame */ \"a\"], _Cyberpunk2077Game__WEBPACK_IMPORTED_MODULE_9__[/* Cyberpunk2077Game */ \"a\"], _MinesweeperGame__WEBPACK_IMPORTED_MODULE_10__[/* MinesweeperGame */ \"a\"], _WireCuttingGame__WEBPACK_IMPORTED_MODULE_11__[/* WireCuttingGame */ \"a\"]];\nfunction Game(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_0__[/* use */ \"b\"].Router();\n const [level, setLevel] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(1);\n const [stage, setStage] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(Stage.Countdown);\n const [results, setResults] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"\");\n const [gameIds, setGameIds] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length)\n });\n\n function nextGameId() {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n\n return id;\n }\n\n function setupNextGame() {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId()\n });\n }\n\n function success() {\n pushResult(true);\n\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n\n setupNextGame();\n }\n\n function pushResult(win) {\n setResults(old => {\n let next = old;\n next += win ? \"✓\" : \"✗\";\n if (next.length > 15) next = next.slice(1);\n return next;\n });\n }\n\n function failure(options) {\n setStage(Stage.Countdown);\n pushResult(false); // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n\n const damage = options !== null && options !== void 0 && options.automated ? player.hp : props.StartingDifficulty * 3;\n\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n\n setupNextGame();\n }\n\n let stageComponent;\n\n switch (stage) {\n case Stage.Countdown:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Countdown__WEBPACK_IMPORTED_MODULE_3__[/* Countdown */ \"a\"], {\n onFinish: () => setStage(Stage.Minigame)\n });\n break;\n\n case Stage.Minigame:\n {\n const MiniGame = minigames[gameIds.id];\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(MiniGame, {\n onSuccess: success,\n onFailure: failure,\n difficulty: props.Difficulty + level / 50\n });\n break;\n }\n\n case Stage.Sell:\n stageComponent = react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_Victory__WEBPACK_IMPORTED_MODULE_12__[/* Victory */ \"a\"], {\n StartingDifficulty: props.StartingDifficulty,\n Difficulty: props.Difficulty,\n MaxLevel: props.MaxLevel\n });\n break;\n }\n\n function Progress() {\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h4\", null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"span\", {\n style: {\n color: \"gray\"\n }\n }, results.slice(0, results.length - 1)), results[results.length - 1]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h3\", null, \"Level: \", level, \"\\xA0/\\xA0\", props.MaxLevel), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Progress, null)), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, stageComponent)));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Game.tsx?"); /***/ }), /* 924 */ @@ -5828,7 +5828,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Countdown; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n\n\nfunction Countdown(props) {\n const [x, setX] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(3);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n\n setTimeout(() => setX(x - 1), 200);\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Get Ready!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, x))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Countdown.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Countdown; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n\n\nfunction Countdown(props) {\n const [x, setX] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(3);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n\n setTimeout(() => setX(x - 1), 200);\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Get Ready!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, x))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Countdown.tsx?"); /***/ }), /* 925 */ @@ -5840,7 +5840,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BracketGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 8000,\n min: 2,\n max: 3\n },\n Normal: {\n timer: 6000,\n min: 4,\n max: 5\n },\n Hard: {\n timer: 4000,\n min: 4,\n max: 6\n },\n Impossible: {\n timer: 2500,\n min: 7,\n max: 7\n }\n};\n\nfunction generateLeftSide(difficulty) {\n let str = \"\";\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event) {\n if (event.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) return \">\";\n return \"\";\n}\n\nfunction match(left, right) {\n return left === \"[\" && right === \"]\" || left === \"<\" && right === \">\" || left === \"(\" && right === \")\" || left === \"{\" && right === \"}\";\n}\n\nfunction BracketGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [left] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateLeftSide(difficulty));\n\n function press(event) {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n\n setRight(right + char);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Close the brackets\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, `${left}${right}`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BracketGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BracketGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 460);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 8000,\n min: 2,\n max: 3\n },\n Normal: {\n timer: 6000,\n min: 4,\n max: 5\n },\n Hard: {\n timer: 4000,\n min: 4,\n max: 6\n },\n Impossible: {\n timer: 2500,\n min: 7,\n max: 7\n }\n};\n\nfunction generateLeftSide(difficulty) {\n let str = \"\";\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n\n for (let i = 0; i < length; i++) {\n str += [\"[\", \"<\", \"(\", \"{\"][Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event) {\n if (event.keyCode == 48 && event.shiftKey) return \")\";\n if (event.keyCode == 221 && !event.shiftKey) return \"]\";\n if (event.keyCode == 221 && event.shiftKey) return \"}\";\n if (event.keyCode == 190 && event.shiftKey) return \">\";\n return \"\";\n}\n\nfunction match(left, right) {\n return left === \"[\" && right === \"]\" || left === \"<\" && right === \">\" || left === \"(\" && right === \")\" || left === \"{\" && right === \"}\";\n}\n\nfunction BracketGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [left] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateLeftSide(difficulty));\n\n function press(event) {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n\n setRight(right + char);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Close the brackets\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, `${left}${right}`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BracketGame.tsx?"); /***/ }), /* 926 */, @@ -5853,7 +5853,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlashGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n window: 600\n },\n Normal: {\n window: 325\n },\n Hard: {\n window: 250\n },\n Impossible: {\n window: 150\n }\n};\nfunction SlashGame(props) {\n const difficulty = {\n window: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const [guarding, setGuarding] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: 5000,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Slash when his guard is down!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, guarding ? \"!Guarding!\" : \"!ATTACKING!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/SlashGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlashGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n window: 600\n },\n Normal: {\n window: 325\n },\n Hard: {\n window: 250\n },\n Impossible: {\n window: 150\n }\n};\nfunction SlashGame(props) {\n const difficulty = {\n window: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const [guarding, setGuarding] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode !== 32) return;\n\n if (guarding) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let id2 = -1;\n const id = window.setTimeout(() => {\n setGuarding(false);\n id2 = window.setTimeout(() => setGuarding(true), difficulty.window);\n }, Math.random() * 3250 + 1500);\n return () => {\n clearInterval(id);\n if (id2 !== -1) clearInterval(id2);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: 5000,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Slash when his guard is down!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, guarding ? \"!Guarding!\" : \"!ATTACKING!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/SlashGame.tsx?"); /***/ }), /* 928 */ @@ -5865,7 +5865,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BackwardGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 459);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 16000,\n min: 3,\n max: 4\n },\n Normal: {\n timer: 12500,\n min: 2,\n max: 3\n },\n Hard: {\n timer: 15000,\n min: 3,\n max: 4\n },\n Impossible: {\n timer: 8000,\n min: 4,\n max: 4\n }\n};\nfunction BackwardGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeAnswer(difficulty));\n const [guess, setGuess] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode === 16) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();else if (answer === nextGuess) props.onSuccess();else setGuess(nextGuess);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Type it backward\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n transform: \"scaleX(-1)\"\n }\n }, answer)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, guess, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null))));\n}\n\nfunction makeAnswer(difficulty) {\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n let answer = \"\";\n\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\"ALGORITHM\", \"ANALOG\", \"APP\", \"APPLICATION\", \"ARRAY\", \"BACKUP\", \"BANDWIDTH\", \"BINARY\", \"BIT\", \"BITE\", \"BITMAP\", \"BLOG\", \"BLOGGER\", \"BOOKMARK\", \"BOOT\", \"BROADBAND\", \"BROWSER\", \"BUFFER\", \"BUG\", \"BUS\", \"BYTE\", \"CACHE\", \"CAPS LOCK\", \"CAPTCHA\", \"CD\", \"CD-ROM\", \"CLIENT\", \"CLIPBOARD\", \"CLOUD\", \"COMPUTING\", \"COMMAND\", \"COMPILE\", \"COMPRESS\", \"COMPUTER\", \"CONFIGURE\", \"COOKIE\", \"COPY\", \"CPU\", \"CYBERCRIME\", \"CYBERSPACE\", \"DASHBOARD\", \"DATA\", \"MINING\", \"DATABASE\", \"DEBUG\", \"DECOMPRESS\", \"DELETE\", \"DESKTOP\", \"DEVELOPMENT\", \"DIGITAL\", \"DISK\", \"DNS\", \"DOCUMENT\", \"DOMAIN\", \"DOMAIN NAME\", \"DOT\", \"DOT MATRIX\", \"DOWNLOAD\", \"DRAG\", \"DVD\", \"DYNAMIC\", \"EMAIL\", \"EMOTICON\", \"ENCRYPT\", \"ENCRYPTION\", \"ENTER\", \"EXABYTE\", \"FAQ\", \"FILE\", \"FINDER\", \"FIREWALL\", \"FIRMWARE\", \"FLAMING\", \"FLASH\", \"FLASH DRIVE\", \"FLOPPY DISK\", \"FLOWCHART\", \"FOLDER\", \"FONT\", \"FORMAT\", \"FRAME\", \"FREEWARE\", \"GIGABYTE\", \"GRAPHICS\", \"HACK\", \"HACKER\", \"HARDWARE\", \"HOME PAGE\", \"HOST\", \"HTML\", \"HYPERLINK\", \"HYPERTEXT\", \"ICON\", \"INBOX\", \"INTEGER\", \"INTERFACE\", \"INTERNET\", \"IP ADDRESS\", \"ITERATION\", \"JAVA\", \"JOYSTICK\", \"JUNKMAIL\", \"KERNEL\", \"KEY\", \"KEYBOARD\", \"KEYWORD\", \"LAPTOP\", \"LASER PRINTER\", \"LINK\", \"LINUX\", \"LOG OUT\", \"LOGIC\", \"LOGIN\", \"LURKING\", \"MACINTOSH\", \"MACRO\", \"MAINFRAME\", \"MALWARE\", \"MEDIA\", \"MEMORY\", \"MIRROR\", \"MODEM\", \"MONITOR\", \"MOTHERBOARD\", \"MOUSE\", \"MULTIMEDIA\", \"NET\", \"NETWORK\", \"NODE\", \"NOTEBOOK\", \"COMPUTER\", \"OFFLINE\", \"ONLINE\", \"OPENSOURCE\", \"OPERATING\", \"SYSTEM\", \"OPTION\", \"OUTPUT\", \"PAGE\", \"PASSWORD\", \"PASTE\", \"PATH\", \"PHISHING\", \"PIRACY\", \"PIRATE\", \"PLATFORM\", \"PLUGIN\", \"PODCAST\", \"POPUP\", \"PORTAL\", \"PRINT\", \"PRINTER\", \"PRIVACY\", \"PROCESS\", \"PROGRAM\", \"PROGRAMMER\", \"PROTOCOL\", \"QUEUE\", \"QWERTY\", \"RAM\", \"REALTIME\", \"REBOOT\", \"RESOLUTION\", \"RESTORE\", \"ROM\", \"ROOT\", \"ROUTER\", \"RUNTIME\", \"SAVE\", \"SCAN\", \"SCANNER\", \"SCREEN\", \"SCREENSHOT\", \"SCRIPT\", \"SCROLL\", \"SCROLL\", \"SEARCH\", \"ENGINE\", \"SECURITY\", \"SERVER\", \"SHAREWARE\", \"SHELL\", \"SHIFT\", \"SHIFT KEY\", \"SNAPSHOT\", \"SOCIAL NETWORKING\", \"SOFTWARE\", \"SPAM\", \"SPAMMER\", \"SPREADSHEET\", \"SPYWARE\", \"STATUS\", \"STORAGE\", \"SUPERCOMPUTER\", \"SURF\", \"SYNTAX\", \"TABLE\", \"TAG\", \"TERMINAL\", \"TEMPLATE\", \"TERABYTE\", \"TEXT EDITOR\", \"THREAD\", \"TOOLBAR\", \"TRASH\", \"TROJAN HORSE\", \"TYPEFACE\", \"UNDO\", \"UNIX\", \"UPLOAD\", \"URL\", \"USER\", \"USER INTERFACE\", \"USERNAME\", \"UTILITY\", \"VERSION\", \"VIRTUAL\", \"VIRTUAL MEMORY\", \"VIRUS\", \"WEB\", \"WEBMASTER\", \"WEBSITE\", \"WIDGET\", \"WIKI\", \"WINDOW\", \"WINDOWS\", \"WIRELESS\", \"PROCESSOR\", \"WORKSTATION\", \"WEB\", \"WORM\", \"WWW\", \"XML\", \"ZIP\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BackwardGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BackwardGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./BlinkingCursor */ 460);\n\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 16000,\n min: 3,\n max: 4\n },\n Normal: {\n timer: 12500,\n min: 2,\n max: 3\n },\n Hard: {\n timer: 15000,\n min: 3,\n max: 4\n },\n Impossible: {\n timer: 8000,\n min: 4,\n max: 4\n }\n};\nfunction BackwardGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeAnswer(difficulty));\n const [guess, setGuess] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function press(event) {\n event.preventDefault();\n if (event.keyCode === 16) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();else if (answer === nextGuess) props.onSuccess();else setGuess(nextGuess);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Type it backward\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n transform: \"scaleX(-1)\"\n }\n }, answer)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, guess, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_BlinkingCursor__WEBPACK_IMPORTED_MODULE_6__[/* BlinkingCursor */ \"a\"], null))));\n}\n\nfunction makeAnswer(difficulty) {\n const length = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max);\n let answer = \"\";\n\n for (let i = 0; i < length; i++) {\n if (i > 0) answer += \" \";\n answer += words[Math.floor(Math.random() * words.length)];\n }\n\n return answer;\n}\n\nconst words = [\"ALGORITHM\", \"ANALOG\", \"APP\", \"APPLICATION\", \"ARRAY\", \"BACKUP\", \"BANDWIDTH\", \"BINARY\", \"BIT\", \"BITE\", \"BITMAP\", \"BLOG\", \"BLOGGER\", \"BOOKMARK\", \"BOOT\", \"BROADBAND\", \"BROWSER\", \"BUFFER\", \"BUG\", \"BUS\", \"BYTE\", \"CACHE\", \"CAPS LOCK\", \"CAPTCHA\", \"CD\", \"CD-ROM\", \"CLIENT\", \"CLIPBOARD\", \"CLOUD\", \"COMPUTING\", \"COMMAND\", \"COMPILE\", \"COMPRESS\", \"COMPUTER\", \"CONFIGURE\", \"COOKIE\", \"COPY\", \"CPU\", \"CYBERCRIME\", \"CYBERSPACE\", \"DASHBOARD\", \"DATA\", \"MINING\", \"DATABASE\", \"DEBUG\", \"DECOMPRESS\", \"DELETE\", \"DESKTOP\", \"DEVELOPMENT\", \"DIGITAL\", \"DISK\", \"DNS\", \"DOCUMENT\", \"DOMAIN\", \"DOMAIN NAME\", \"DOT\", \"DOT MATRIX\", \"DOWNLOAD\", \"DRAG\", \"DVD\", \"DYNAMIC\", \"EMAIL\", \"EMOTICON\", \"ENCRYPT\", \"ENCRYPTION\", \"ENTER\", \"EXABYTE\", \"FAQ\", \"FILE\", \"FINDER\", \"FIREWALL\", \"FIRMWARE\", \"FLAMING\", \"FLASH\", \"FLASH DRIVE\", \"FLOPPY DISK\", \"FLOWCHART\", \"FOLDER\", \"FONT\", \"FORMAT\", \"FRAME\", \"FREEWARE\", \"GIGABYTE\", \"GRAPHICS\", \"HACK\", \"HACKER\", \"HARDWARE\", \"HOME PAGE\", \"HOST\", \"HTML\", \"HYPERLINK\", \"HYPERTEXT\", \"ICON\", \"INBOX\", \"INTEGER\", \"INTERFACE\", \"INTERNET\", \"IP ADDRESS\", \"ITERATION\", \"JAVA\", \"JOYSTICK\", \"JUNKMAIL\", \"KERNEL\", \"KEY\", \"KEYBOARD\", \"KEYWORD\", \"LAPTOP\", \"LASER PRINTER\", \"LINK\", \"LINUX\", \"LOG OUT\", \"LOGIC\", \"LOGIN\", \"LURKING\", \"MACINTOSH\", \"MACRO\", \"MAINFRAME\", \"MALWARE\", \"MEDIA\", \"MEMORY\", \"MIRROR\", \"MODEM\", \"MONITOR\", \"MOTHERBOARD\", \"MOUSE\", \"MULTIMEDIA\", \"NET\", \"NETWORK\", \"NODE\", \"NOTEBOOK\", \"COMPUTER\", \"OFFLINE\", \"ONLINE\", \"OPENSOURCE\", \"OPERATING\", \"SYSTEM\", \"OPTION\", \"OUTPUT\", \"PAGE\", \"PASSWORD\", \"PASTE\", \"PATH\", \"PHISHING\", \"PIRACY\", \"PIRATE\", \"PLATFORM\", \"PLUGIN\", \"PODCAST\", \"POPUP\", \"PORTAL\", \"PRINT\", \"PRINTER\", \"PRIVACY\", \"PROCESS\", \"PROGRAM\", \"PROGRAMMER\", \"PROTOCOL\", \"QUEUE\", \"QWERTY\", \"RAM\", \"REALTIME\", \"REBOOT\", \"RESOLUTION\", \"RESTORE\", \"ROM\", \"ROOT\", \"ROUTER\", \"RUNTIME\", \"SAVE\", \"SCAN\", \"SCANNER\", \"SCREEN\", \"SCREENSHOT\", \"SCRIPT\", \"SCROLL\", \"SCROLL\", \"SEARCH\", \"ENGINE\", \"SECURITY\", \"SERVER\", \"SHAREWARE\", \"SHELL\", \"SHIFT\", \"SHIFT KEY\", \"SNAPSHOT\", \"SOCIAL NETWORKING\", \"SOFTWARE\", \"SPAM\", \"SPAMMER\", \"SPREADSHEET\", \"SPYWARE\", \"STATUS\", \"STORAGE\", \"SUPERCOMPUTER\", \"SURF\", \"SYNTAX\", \"TABLE\", \"TAG\", \"TERMINAL\", \"TEMPLATE\", \"TERABYTE\", \"TEXT EDITOR\", \"THREAD\", \"TOOLBAR\", \"TRASH\", \"TROJAN HORSE\", \"TYPEFACE\", \"UNDO\", \"UNIX\", \"UPLOAD\", \"URL\", \"USER\", \"USER INTERFACE\", \"USERNAME\", \"UTILITY\", \"VERSION\", \"VIRTUAL\", \"VIRTUAL MEMORY\", \"VIRUS\", \"WEB\", \"WEBMASTER\", \"WEBSITE\", \"WIDGET\", \"WIKI\", \"WINDOW\", \"WINDOWS\", \"WIRELESS\", \"PROCESSOR\", \"WORKSTATION\", \"WEB\", \"WORM\", \"WWW\", \"XML\", \"ZIP\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BackwardGame.tsx?"); /***/ }), /* 929 */ @@ -5877,7 +5877,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12000,\n size: 6\n },\n Normal: {\n timer: 9000,\n size: 8\n },\n Hard: {\n timer: 5000,\n size: 9\n },\n Impossible: {\n timer: 2500,\n size: 12\n }\n};\nfunction BribeGame(props) {\n const difficulty = {\n timer: 0,\n size: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeChoices(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n const k = event.keyCode;\n\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].includes(k)) newIndex--;\n\n while (newIndex < 0) newIndex += choices.length;\n\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n\n setIndex(newIndex);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Say something nice about the guard.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, choices[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2193\")));\n}\n\nfunction shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty) {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n\n if (choices.includes(option)) {\n i--;\n continue;\n }\n\n choices.push(option);\n }\n\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\"affectionate\", \"agreeable\", \"bright\", \"charming\", \"creative\", \"determined\", \"energetic\", \"friendly\", \"funny\", \"generous\", \"polite\", \"likable\", \"diplomatic\", \"helpful\", \"giving\", \"kind\", \"hardworking\", \"patient\", \"dynamic\", \"loyal\"];\nconst negative = [\"aggressive\", \"aloof\", \"arrogant\", \"big-headed\", \"boastful\", \"boring\", \"bossy\", \"careless\", \"clingy\", \"couch potato\", \"cruel\", \"cynical\", \"grumpy\", \"hot air\", \"know it all\", \"obnoxious\", \"pain in the neck\", \"picky\", \"tactless\", \"thoughtless\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BribeGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BribeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12000,\n size: 6\n },\n Normal: {\n timer: 9000,\n size: 8\n },\n Hard: {\n timer: 5000,\n size: 9\n },\n Impossible: {\n timer: 2500,\n size: 12\n }\n};\nfunction BribeGame(props) {\n const difficulty = {\n timer: 0,\n size: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(makeChoices(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n const k = event.keyCode;\n\n if (k === 32) {\n if (positive.includes(choices[index])) props.onSuccess();else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([38, 87, 68, 39].includes(k)) newIndex++;\n if ([65, 37, 83, 40].includes(k)) newIndex--;\n\n while (newIndex < 0) newIndex += choices.length;\n\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n\n setIndex(newIndex);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Say something nice about the guard.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2191\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, choices[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: \"2em\"\n }\n }, \"\\u2193\")));\n}\n\nfunction shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n const temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n}\n\nfunction makeChoices(difficulty) {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n\n if (choices.includes(option)) {\n i--;\n continue;\n }\n\n choices.push(option);\n }\n\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\"affectionate\", \"agreeable\", \"bright\", \"charming\", \"creative\", \"determined\", \"energetic\", \"friendly\", \"funny\", \"generous\", \"polite\", \"likable\", \"diplomatic\", \"helpful\", \"giving\", \"kind\", \"hardworking\", \"patient\", \"dynamic\", \"loyal\"];\nconst negative = [\"aggressive\", \"aloof\", \"arrogant\", \"big-headed\", \"boastful\", \"boring\", \"bossy\", \"careless\", \"clingy\", \"couch potato\", \"cruel\", \"cynical\", \"grumpy\", \"hot air\", \"know it all\", \"obnoxious\", \"pain in the neck\", \"picky\", \"tactless\", \"thoughtless\"];\n\n//# sourceURL=webpack:///./src/Infiltration/ui/BribeGame.tsx?"); /***/ }), /* 930 */ @@ -5889,7 +5889,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CheatCodeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 13000,\n min: 6,\n max: 8\n },\n Normal: {\n timer: 7000,\n min: 7,\n max: 8\n },\n Hard: {\n timer: 5000,\n min: 8,\n max: 9\n },\n Impossible: {\n timer: 3000,\n min: 9,\n max: 10\n }\n};\nfunction CheatCodeGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateCode(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n\n if (code[index] !== Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* getArrow */ \"a\"])(event)) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Enter the Code!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, code[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateCode(difficulty) {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n\n for (let i = 0; i < Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n\n code += arrow;\n }\n\n return code;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/CheatCodeGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CheatCodeGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 13000,\n min: 6,\n max: 8\n },\n Normal: {\n timer: 7000,\n min: 7,\n max: 8\n },\n Hard: {\n timer: 5000,\n min: 8,\n max: 9\n },\n Impossible: {\n timer: 3000,\n min: 9,\n max: 10\n }\n};\nfunction CheatCodeGame(props) {\n const difficulty = {\n timer: 0,\n min: 0,\n max: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateCode(difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n\n function press(event) {\n event.preventDefault();\n\n if (code[index] !== Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* getArrow */ \"a\"])(event)) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Enter the Code!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n fontSize: \"5em\"\n }\n }, code[index]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateCode(difficulty) {\n const arrows = [\"←\", \"→\", \"↑\", \"↓\"];\n let code = \"\";\n\n for (let i = 0; i < Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n\n code += arrow;\n }\n\n return code;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/CheatCodeGame.tsx?"); /***/ }), /* 931 */ @@ -5901,7 +5901,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cyberpunk2077Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12500,\n width: 3,\n height: 3,\n symbols: 6\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n symbols: 7\n },\n Hard: {\n timer: 12500,\n width: 5,\n height: 5,\n symbols: 8\n },\n Impossible: {\n timer: 10000,\n width: 6,\n height: 6,\n symbols: 9\n }\n};\nfunction Cyberpunk2077Game(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n symbols: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generatePuzzle(difficulty));\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateAnswer(grid, difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n\n function press(event) {\n event.preventDefault();\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Match the symbols!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: fontSize\n }\n }, \"Targets:\", \" \", answer.map((a, i) => {\n if (i == index) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\",\n color: \"blue\"\n }\n }, a, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\"\n }\n }, a, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), grid.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize,\n color: \"blue\"\n }\n }, cell, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize\n }\n }, cell, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateAnswer(grid, difficulty) {\n const answer = [];\n\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n\n return answer;\n}\n\nfunction randChar() {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty) {\n const puzzle = [];\n\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n\n puzzle.push(line);\n }\n\n return puzzle;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Cyberpunk2077Game; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 195);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 12500,\n width: 3,\n height: 3,\n symbols: 6\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n symbols: 7\n },\n Hard: {\n timer: 12500,\n width: 5,\n height: 5,\n symbols: 8\n },\n Impossible: {\n timer: 10000,\n width: 6,\n height: 6,\n symbols: 9\n }\n};\nfunction Cyberpunk2077Game(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n symbols: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generatePuzzle(difficulty));\n const [answer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateAnswer(grid, difficulty));\n const [index, setIndex] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n\n function press(event) {\n event.preventDefault();\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + grid[0].length) % grid[0].length;\n next[1] = (next[1] + grid.length) % grid.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Match the symbols!\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", {\n style: {\n fontSize: fontSize\n }\n }, \"Targets:\", \" \", answer.map((a, i) => {\n if (i == index) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\",\n color: \"blue\"\n }\n }, a, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${i}`,\n style: {\n fontSize: \"1em\"\n }\n }, a, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), grid.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize,\n color: \"blue\"\n }\n }, cell, \"\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: `${x}${y}`,\n style: {\n fontSize: fontSize\n }\n }, cell, \"\\xA0\");\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction generateAnswer(grid, difficulty) {\n const answer = [];\n\n for (let i = 0; i < Math.round(difficulty.symbols); i++) {\n answer.push(grid[Math.floor(Math.random() * grid.length)][Math.floor(Math.random() * grid[0].length)]);\n }\n\n return answer;\n}\n\nfunction randChar() {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty) {\n const puzzle = [];\n\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n\n puzzle.push(line);\n }\n\n return puzzle;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx?"); /***/ }), /* 932 */ @@ -5913,7 +5913,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MinesweeperGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 194);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 15000,\n width: 3,\n height: 3,\n mines: 4\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n mines: 7\n },\n Hard: {\n timer: 15000,\n width: 5,\n height: 5,\n mines: 11\n },\n Impossible: {\n timer: 15000,\n width: 6,\n height: 6,\n mines: 15\n }\n};\nfunction MinesweeperGame(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n mines: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateMinefield(difficulty));\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateEmptyField(difficulty));\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n const [memoryPhase, setMemoryPhase] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n\n setAnswer(old => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"), minefield.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[?]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n } else {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[X]\\xA0\");\n if (answer[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[.]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction fieldEquals(a, b) {\n function count(field) {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty) {\n const field = [];\n\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n\n return field;\n}\n\nfunction generateMinefield(difficulty) {\n const field = generateEmptyField(difficulty);\n\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n\n if (field[x][y]) {\n i--;\n continue;\n }\n\n field[x][y] = true;\n }\n\n return field;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/MinesweeperGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MinesweeperGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Difficulty */ 150);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../utils */ 195);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 15000,\n width: 3,\n height: 3,\n mines: 4\n },\n Normal: {\n timer: 15000,\n width: 4,\n height: 4,\n mines: 7\n },\n Hard: {\n timer: 15000,\n width: 5,\n height: 5,\n mines: 11\n },\n Impossible: {\n timer: 15000,\n width: 6,\n height: 6,\n mines: 15\n }\n};\nfunction MinesweeperGame(props) {\n const difficulty = {\n timer: 0,\n width: 0,\n height: 0,\n mines: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_4__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateMinefield(difficulty));\n const [answer, setAnswer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateEmptyField(difficulty));\n const [pos, setPos] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([0, 0]);\n const [memoryPhase, setMemoryPhase] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n\n function press(event) {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* getArrow */ \"a\"])(event);\n\n switch (arrow) {\n case \"↑\":\n move[1]--;\n break;\n\n case \"←\":\n move[0]--;\n break;\n\n case \"↓\":\n move[1]++;\n break;\n\n case \"→\":\n move[0]++;\n break;\n }\n\n const next = [pos[0] + move[0], pos[1] + move[1]];\n next[0] = (next[0] + minefield[0].length) % minefield[0].length;\n next[1] = (next[1] + minefield.length) % minefield.length;\n setPos(next);\n\n if (event.keyCode == 32) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\n }\n\n setAnswer(old => {\n old[pos[1]][pos[0]] = true;\n if (fieldEquals(minefield, old)) props.onSuccess();\n return old;\n });\n }\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"), minefield.map((line, y) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: y\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[?]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n } else {\n if (x == pos[0] && y == pos[1]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[X]\\xA0\");\n if (answer[y][x]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[.]\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: x\n }, \"[\\xA0]\\xA0\");\n }\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction fieldEquals(a, b) {\n function count(field) {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty) {\n const field = [];\n\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n\n return field;\n}\n\nfunction generateMinefield(difficulty) {\n const field = generateEmptyField(difficulty);\n\n for (let i = 0; i < difficulty.mines; i++) {\n const x = Math.floor(Math.random() * field.length);\n const y = Math.floor(Math.random() * field[0].length);\n\n if (field[x][y]) {\n i--;\n continue;\n }\n\n field[x][y] = true;\n }\n\n return field;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/MinesweeperGame.tsx?"); /***/ }), /* 933 */ @@ -5925,7 +5925,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WireCuttingGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 194);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 9000,\n wiresmin: 4,\n wiresmax: 4,\n rules: 2\n },\n Normal: {\n timer: 7000,\n wiresmin: 6,\n wiresmax: 6,\n rules: 2\n },\n Hard: {\n timer: 5000,\n wiresmin: 8,\n wiresmax: 8,\n rules: 3\n },\n Impossible: {\n timer: 4000,\n wiresmin: 9,\n wiresmax: 9,\n rules: 4\n }\n};\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\nconst colorNames = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\"\n};\nfunction WireCuttingGame(props) {\n const difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateWires(difficulty));\n const [cutWires, setCutWires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(new Array(wires.length).fill(false));\n const [questions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateQuestion(wires, difficulty));\n\n function press(event) {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires(old => {\n const next = [...old];\n next[wireNum - 1] = true;\n\n if (!questions.some(q => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n } // check if we won\n\n\n const wiresToBeCut = [];\n\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n\n wiresToBeCut.push(shouldBeCut);\n }\n\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Cut the wires with the following properties! (keyboard 1 to 9)\"), questions.map((question, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h3\", {\n key: i\n }, question.toString())), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, new Array(wires.length).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i\n }, \"\\xA0\", i + 1, \"\\xA0\\xA0\\xA0\\xA0\"))), new Array(8).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j\n }, \"\\xA0\\xA0\\xA0\\xA0\\xA0\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j,\n style: {\n color: wire.colors[i % wire.colors.length]\n }\n }, \"|\", wire.tpe, \"|\\xA0\\xA0\\xA0\");\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction randomPositionQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: () => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire, i) => {\n return index === i;\n }\n };\n}\n\nfunction randomColorQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: () => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: wire => {\n return wire.colors.includes(cutColor);\n }\n };\n}\n\nfunction generateQuestion(wires, difficulty) {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n\n return questions;\n}\n\nfunction generateWires(difficulty) {\n const wires = [];\n const numWires = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.wiresmin, difficulty.wiresmax);\n\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors\n });\n }\n\n return wires;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/WireCuttingGame.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WireCuttingGame; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _KeyHandler__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./KeyHandler */ 148);\n/* harmony import */ var _GameTimer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GameTimer */ 149);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../utils */ 195);\n/* harmony import */ var _Difficulty__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Difficulty */ 150);\n\n\n\n\n\n\nconst difficulties = {\n Trivial: {\n timer: 9000,\n wiresmin: 4,\n wiresmax: 4,\n rules: 2\n },\n Normal: {\n timer: 7000,\n wiresmin: 6,\n wiresmax: 6,\n rules: 2\n },\n Hard: {\n timer: 5000,\n wiresmin: 8,\n wiresmax: 8,\n rules: 3\n },\n Impossible: {\n timer: 4000,\n wiresmin: 9,\n wiresmax: 9,\n rules: 4\n }\n};\nconst types = [\"|\", \".\", \"/\", \"-\", \"█\", \"#\"];\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\nconst colorNames = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\"\n};\nfunction WireCuttingGame(props) {\n const difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0\n };\n Object(_Difficulty__WEBPACK_IMPORTED_MODULE_5__[/* interpolate */ \"a\"])(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateWires(difficulty));\n const [cutWires, setCutWires] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(new Array(wires.length).fill(false));\n const [questions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(generateQuestion(wires, difficulty));\n\n function press(event) {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires(old => {\n const next = [...old];\n next[wireNum - 1] = true;\n\n if (!questions.some(q => q.shouldCut(wires[wireNum - 1], wireNum - 1))) {\n props.onFailure();\n } // check if we won\n\n\n const wiresToBeCut = [];\n\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n\n wiresToBeCut.push(shouldBeCut);\n }\n\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GameTimer__WEBPACK_IMPORTED_MODULE_3__[/* GameTimer */ \"a\"], {\n millis: timer,\n onExpire: props.onFailure\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n item: true,\n xs: 12\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n className: \"noselect\"\n }, \"Cut the wires with the following properties! (keyboard 1 to 9)\"), questions.map((question, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h3\", {\n key: i\n }, question.toString())), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, new Array(wires.length).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: i\n }, \"\\xA0\", i + 1, \"\\xA0\\xA0\\xA0\\xA0\"))), new Array(8).fill(0).map((_, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j\n }, \"\\xA0\\xA0\\xA0\\xA0\\xA0\\xA0\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n key: j,\n style: {\n color: wire.colors[i % wire.colors.length]\n }\n }, \"|\", wire.tpe, \"|\\xA0\\xA0\\xA0\");\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_KeyHandler__WEBPACK_IMPORTED_MODULE_2__[/* KeyHandler */ \"a\"], {\n onKeyDown: press,\n onFailure: props.onFailure\n })));\n}\n\nfunction randomPositionQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: () => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire, i) => {\n return index === i;\n }\n };\n}\n\nfunction randomColorQuestion(wires) {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: () => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: wire => {\n return wire.colors.includes(cutColor);\n }\n };\n}\n\nfunction generateQuestion(wires, difficulty) {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n\n return questions;\n}\n\nfunction generateWires(difficulty) {\n const wires = [];\n const numWires = Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* random */ \"b\"])(difficulty.wiresmin, difficulty.wiresmax);\n\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors\n });\n }\n\n return wires;\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/WireCuttingGame.tsx?"); /***/ }), /* 934 */ @@ -5937,7 +5937,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Victory; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\nfunction Victory(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"none\");\n\n function quitInfiltration() {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n const repGain = Math.pow(props.Difficulty + 1, 1.1) * Math.pow(props.StartingDifficulty, 1.2) * 30 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep;\n const moneyGain = Math.pow(props.Difficulty + 1, 2) * Math.pow(props.StartingDifficulty, 3) * 3e3 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney;\n\n function sell() {\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade() {\n if (faction === \"none\") return;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event) {\n setFaction(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Infiltration successful!\")), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h2\", null, \"You can trade the confidential information you found for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: changeDropdown\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: \"none\",\n value: \"none\"\n }, \"none\"), player.factions.filter(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][f].getInfo().offersWork()).map(f => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: f,\n value: f\n }, f))), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: trade,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Trade for \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(repGain), \" reputation\")\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: sell,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Sell for \", react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: moneyGain\n }))\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: quitInfiltration,\n text: \"Quit\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Victory.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Victory; });\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../Faction/Factions */ 22);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\nfunction Victory(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const [faction, setFaction] = Object(react__WEBPACK_IMPORTED_MODULE_1__[\"useState\"])(\"none\");\n\n function quitInfiltration() {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n const repGain = Math.pow(props.Difficulty + 1, 1.1) * Math.pow(props.StartingDifficulty, 1.2) * 30 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationRep;\n const moneyGain = Math.pow(props.Difficulty + 1, 2) * Math.pow(props.StartingDifficulty, 3) * 3e3 * levelBonus * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].InfiltrationMoney;\n\n function sell() {\n player.gainMoney(moneyGain);\n player.recordMoneySource(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade() {\n if (faction === \"none\") return;\n _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event) {\n setFaction(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h1\", null, \"Infiltration successful!\")), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 10\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"h2\", null, \"You can trade the confidential information you found for money or reputation.\"), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: changeDropdown\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: \"none\",\n value: \"none\"\n }, \"none\"), player.factions.filter(f => _Faction_Factions__WEBPACK_IMPORTED_MODULE_0__[/* Factions */ \"a\"][f].getInfo().offersWork()).map(f => react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(\"option\", {\n key: f,\n value: f\n }, f))), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: trade,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Trade for \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_5__[/* Reputation */ \"a\"])(repGain), \" reputation\")\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: sell,\n text: react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_1___default.a.Fragment, null, \"Sell for \", react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: moneyGain\n }))\n })), react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n item: true,\n xs: 3\n }, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: quitInfiltration,\n text: \"Quit\"\n }))));\n}\n\n//# sourceURL=webpack:///./src/Infiltration/ui/Victory.tsx?"); /***/ }), /* 935 */ @@ -5949,7 +5949,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Resleeving */ 460);\n/* harmony import */ var _ResleeveElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ResleeveElem */ 937);\n\n\n\nconst SortOption = {\n Cost: \"Cost\",\n Hacking: \"Hacking Level\",\n Strength: \"Strength Level\",\n Defense: \"Defense Level\",\n Dexterity: \"Dexterity Level\",\n Agility: \"Agility Level\",\n Charisma: \"Charisma Level\",\n AverageCombatStats: \"Average Combat Stats\",\n AverageAllStats: \"Average Stats\",\n TotalNumAugmentations: \"Number of Augmentations\"\n}; // Helper function for averaging\n\nfunction getAverage(...values) {\n let sum = 0;\n\n for (let i = 0; i < values.length; ++i) {\n sum += values[i];\n }\n\n return sum / values.length;\n}\n\nconst SortFunctions = {\n Cost: (a, b) => a.getCost() - b.getCost(),\n Hacking: (a, b) => a.hacking_skill - b.hacking_skill,\n Strength: (a, b) => a.strength - b.strength,\n Defense: (a, b) => a.defense - b.defense,\n Dexterity: (a, b) => a.dexterity - b.dexterity,\n Agility: (a, b) => a.agility - b.agility,\n Charisma: (a, b) => a.charisma - b.charisma,\n AverageCombatStats: (a, b) => getAverage(a.strength, a.defense, a.dexterity, a.agility) - getAverage(b.strength, b.defense, b.dexterity, b.agility),\n AverageAllStats: (a, b) => getAverage(a.hacking_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) - getAverage(b.hacking_skill, b.strength, b.defense, b.dexterity, b.agility, b.charisma),\n TotalNumAugmentations: (a, b) => a.augmentations.length - b.augmentations.length\n};\nfunction ResleeveRoot(props) {\n const [sort, setSort] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(SortOption.Cost); // Randomly create all Resleeves if they dont already exist\n\n if (props.player.resleeves.length === 0) {\n props.player.resleeves = Object(_Resleeving__WEBPACK_IMPORTED_MODULE_1__[/* generateResleeves */ \"a\"])();\n }\n\n function onSortChange(event) {\n setSort(event.target.value);\n }\n\n const sortFunction = SortFunctions[sort];\n if (sortFunction === undefined) throw new Error(`sort function '${sort}' is undefined`);\n props.player.resleeves.sort(sortFunction);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n width: \"75%\"\n }\n }, \"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Sort By: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: sort,\n onChange: onSortChange\n }, Object.keys(SortOption).map(opt => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: opt,\n value: opt\n }, SortOption[opt]))), props.player.resleeves.map((resleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ResleeveElem__WEBPACK_IMPORTED_MODULE_2__[/* ResleeveElem */ \"a\"], {\n key: i,\n player: props.player,\n resleeve: resleeve\n })));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Resleeving */ 461);\n/* harmony import */ var _ResleeveElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ResleeveElem */ 937);\n\n\n\nconst SortOption = {\n Cost: \"Cost\",\n Hacking: \"Hacking Level\",\n Strength: \"Strength Level\",\n Defense: \"Defense Level\",\n Dexterity: \"Dexterity Level\",\n Agility: \"Agility Level\",\n Charisma: \"Charisma Level\",\n AverageCombatStats: \"Average Combat Stats\",\n AverageAllStats: \"Average Stats\",\n TotalNumAugmentations: \"Number of Augmentations\"\n}; // Helper function for averaging\n\nfunction getAverage(...values) {\n let sum = 0;\n\n for (let i = 0; i < values.length; ++i) {\n sum += values[i];\n }\n\n return sum / values.length;\n}\n\nconst SortFunctions = {\n Cost: (a, b) => a.getCost() - b.getCost(),\n Hacking: (a, b) => a.hacking_skill - b.hacking_skill,\n Strength: (a, b) => a.strength - b.strength,\n Defense: (a, b) => a.defense - b.defense,\n Dexterity: (a, b) => a.dexterity - b.dexterity,\n Agility: (a, b) => a.agility - b.agility,\n Charisma: (a, b) => a.charisma - b.charisma,\n AverageCombatStats: (a, b) => getAverage(a.strength, a.defense, a.dexterity, a.agility) - getAverage(b.strength, b.defense, b.dexterity, b.agility),\n AverageAllStats: (a, b) => getAverage(a.hacking_skill, a.strength, a.defense, a.dexterity, a.agility, a.charisma) - getAverage(b.hacking_skill, b.strength, b.defense, b.dexterity, b.agility, b.charisma),\n TotalNumAugmentations: (a, b) => a.augmentations.length - b.augmentations.length\n};\nfunction ResleeveRoot(props) {\n const [sort, setSort] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(SortOption.Cost); // Randomly create all Resleeves if they dont already exist\n\n if (props.player.resleeves.length === 0) {\n props.player.resleeves = Object(_Resleeving__WEBPACK_IMPORTED_MODULE_1__[/* generateResleeves */ \"a\"])();\n }\n\n function onSortChange(event) {\n setSort(event.target.value);\n }\n\n const sortFunction = SortFunctions[sort];\n if (sortFunction === undefined) throw new Error(`sort function '${sort}' is undefined`);\n props.player.resleeves.sort(sortFunction);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\",\n width: \"75%\"\n }\n }, \"Re-sleeving is the process of digitizing and transferring your consciousness into a new human body, or 'sleeve'. Here at VitaLife, you can purchase new specially-engineered bodies for the re-sleeve process. Many of these bodies even come with genetic and cybernetic Augmentations!\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Re-sleeving will change your experience for every stat. It will also REMOVE all of your currently-installed Augmentations, and replace them with the ones provided by the purchased sleeve. However, Augmentations that you have purchased but not installed will NOT be removed. If you have purchased an Augmentation and then re-sleeve into a body which already has that Augmentation, it will be removed (since you cannot have duplicate Augmentations).\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"NOTE: The stats and multipliers displayed on this page do NOT include your bonuses from Source-File.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline-block\"\n }\n }, \"Sort By: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n defaultValue: sort,\n onChange: onSortChange\n }, Object.keys(SortOption).map(opt => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: opt,\n value: opt\n }, SortOption[opt]))), props.player.resleeves.map((resleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ResleeveElem__WEBPACK_IMPORTED_MODULE_2__[/* ResleeveElem */ \"a\"], {\n key: i,\n player: props.player,\n resleeve: resleeve\n })));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveRoot.tsx?"); /***/ }), /* 936 */ @@ -5973,7 +5973,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Resleeving */ 460);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction ResleeveElem(props) {\n const [aug, setAug] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.resleeve.augmentations[0].name);\n\n function openStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Total Multipliers:\")), \"Hacking Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Chance multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_chance_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Speed multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_speed_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Growth multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_grow_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.work_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Company Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.company_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Faction Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.faction_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Success multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_success_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Income multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Purchase Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_purchase_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Level Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_level_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Ram Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_ram_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Core Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_core_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Max Stamina multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_max_stamina_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Stamina Gain multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_stamina_gain_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Field Analysis multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_analysis_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Success Chance multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_success_chance_mult)));\n }\n\n function onAugChange(event) {\n setAug(event.target.value);\n }\n\n const currentAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug];\n const cost = props.resleeve.getCost();\n\n function purchase() {\n if (!Object(_Resleeving__WEBPACK_IMPORTED_MODULE_2__[/* purchaseResleeve */ \"b\"])(props.resleeve, props.player)) return;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You re-sleeved for \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n }), \"!\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-elem\",\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"30%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.hacking_skill), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.hacking_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.strength), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.strength_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.defense), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.defense_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.dexterity), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.dexterity_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.agility), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.agility_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.charisma), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.charisma_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"# Augmentations: \", props.resleeve.augmentations.length), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openStats\n }, \"Multipliers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"50%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"resleeve-aug-selector dropdown\",\n onChange: onAugChange\n }, props.resleeve.augmentations.map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: aug.name,\n value: aug.name\n }, aug.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, currentAug !== undefined && currentAug.info)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"20%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"It costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\n }), \" to purchase this Sleeve.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: purchase\n }, \"Purchase\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ResleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Resleeving__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Resleeving */ 461);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction ResleeveElem(props) {\n const [aug, setAug] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.resleeve.augmentations[0].name);\n\n function openStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Total Multipliers:\")), \"Hacking Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.strength_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.defense_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.dexterity_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.agility_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.charisma_exp_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Chance multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_chance_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Speed multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_speed_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacking Growth multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacking_grow_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Salary multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.work_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Company Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.company_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Faction Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.faction_rep_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Crime Success multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.crime_success_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Income multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_money_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Purchase Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_purchase_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Level Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_level_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Ram Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_ram_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Hacknet Core Upgrade Cost multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.hacknet_node_core_cost_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Max Stamina multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_max_stamina_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Stamina Gain multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_stamina_gain_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Field Analysis multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_analysis_mult), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Bladeburner Success Chance multiplier:\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(props.resleeve.bladeburner_success_chance_mult)));\n }\n\n function onAugChange(event) {\n setAug(event.target.value);\n }\n\n const currentAug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_1__[/* Augmentations */ \"a\"][aug];\n const cost = props.resleeve.getCost();\n\n function purchase() {\n if (!Object(_Resleeving__WEBPACK_IMPORTED_MODULE_2__[/* purchaseResleeve */ \"b\"])(props.resleeve, props.player)) return;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You re-sleeved for \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n }), \"!\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-elem\",\n style: {\n display: \"block\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"30%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hacking: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.hacking_skill), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.hacking_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Strength: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.strength), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.strength_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Defense: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.defense), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.defense_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Dexterity: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.dexterity), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.dexterity_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Agility: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.agility), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.agility_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Charisma: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatSkill(props.resleeve.charisma), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.resleeve.charisma_exp), \" exp)\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"# Augmentations: \", props.resleeve.augmentations.length), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openStats\n }, \"Multipliers\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"50%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"resleeve-aug-selector dropdown\",\n onChange: onAugChange\n }, props.resleeve.augmentations.map(aug => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: aug.name,\n value: aug.name\n }, aug.name))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, currentAug !== undefined && currentAug.info)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"resleeve-panel\",\n style: {\n width: \"20%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"It costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\n }), \" to purchase this Sleeve.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: purchase\n }, \"Purchase\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Resleeving/ui/ResleeveElem.tsx?"); /***/ }), /* 938 */ @@ -5985,7 +5985,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkInProgressRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ 43);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numeralFormat */ 3);\n/* harmony import */ var _React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/Reputation */ 76);\n/* harmony import */ var _React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./React/ReputationRate */ 401);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./React/MoneyRate */ 122);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Company/Companies */ 47);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Locations/Locations */ 223);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 127);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CYCLES_PER_SEC = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction WorkInProgressRoot() {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName];\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n function cancel() {\n router.toFaction();\n player.finishFactionWork(true);\n }\n\n function unfocus() {\n router.toFaction();\n player.stopFocusing();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently \", player.currentWorkFactionDescription, \" for your faction \", faction.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Current Faction Reputation: \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(faction.playerReputation), \"). \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been doing this for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this faction \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"There is no penalty for cancelling earlier.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Faction Work\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n const className = player.className;\n\n if (player.className !== \"\") {\n function cancel() {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toCity();\n }\n\n let stopText = \"\";\n\n if (className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymStrength || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDefense || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDexterity || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymAgility) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You have been \", className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This has cost you: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: -player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyLossRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have gained: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You may cancel at any time\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, stopText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompany) {\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n const penalty = player.cancelationPenalty();\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain \", penaltyString, \" of the reputation you've earned so far.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n const position = player.jobs[player.companyName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(`${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workRepGainRate * CYCLES_PER_SEC)} / sec`), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round(player.timeWorked / player.timeNeededToCompleteWork * 100);\n let numBars = Math.round(percent / 5);\n\n if (numBars < 0) {\n numBars = 0;\n }\n\n if (numBars > 20) {\n numBars = 20;\n } // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n\n\n const progressBar = Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__[/* createProgressBarText */ \"a\"])({\n progress: (numBars + 1) / 20,\n totalTicks: 20\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to \", player.crimeType, \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Time remaining: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeNeededToCompleteWork - player.timeWorked)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, progressBar), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => {\n router.toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_12__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Slums]);\n player.finishCrime(true);\n }\n }, \"Cancel crime\"));\n }\n\n if (player.createProgramName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working on coding \", player.createProgramName, \".\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The program is \", (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork * 100).toFixed(2), \"% complete. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you cancel, your work will be saved and you can come back to complete the program later.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => player.finishCreateProgramWork(true)\n }, \"Cancel work on creating program\"));\n }\n\n setTimeout(() => router.toCity(), 50);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/ui/WorkInProgressRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkInProgressRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Context */ 43);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./numeralFormat */ 3);\n/* harmony import */ var _React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./React/Reputation */ 76);\n/* harmony import */ var _React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./React/ReputationRate */ 402);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./React/MoneyRate */ 123);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Faction/Factions */ 22);\n/* harmony import */ var _Company_Company__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Company/Company */ 172);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../Company/Companies */ 47);\n/* harmony import */ var _Locations_Locations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Locations/Locations */ 194);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Locations/data/LocationNames */ 9);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../utils/helpers/createProgressBarText */ 128);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CYCLES_PER_SEC = 1000 / _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle;\nfunction WorkInProgressRoot() {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n const player = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_9__[/* Factions */ \"a\"][player.currentWorkFactionName];\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeFaction) {\n function cancel() {\n router.toFaction();\n player.finishFactionWork(true);\n }\n\n function unfocus() {\n router.toFaction();\n player.stopFocusing();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently \", player.currentWorkFactionDescription, \" for your faction \", faction.name, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"(Current Faction Reputation: \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(faction.playerReputation), \"). \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been doing this for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this faction \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"There is no penalty for cancelling earlier.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Faction Work\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n const className = player.className;\n\n if (player.className !== \"\") {\n function cancel() {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toCity();\n }\n\n let stopText = \"\";\n\n if (className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymStrength || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDefense || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymDexterity || className == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].ClassGymAgility) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You have been \", className, \" for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"This has cost you: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: -player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyLossRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have gained: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC), \" / sec) hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC), \" / sec) strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC), \" / sec) defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC), \" / sec) dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC), \" / sec) agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC), \" / sec) charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You may cancel at any time\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, stopText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompany) {\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n const penalty = player.cancelationPenalty();\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_ReputationRate__WEBPACK_IMPORTED_MODULE_5__[/* ReputationRate */ \"a\"])(player.workRepGainRate * CYCLES_PER_SEC), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain \", penaltyString, \" of the reputation you've earned so far.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.workType == _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WorkTypeCompanyPartTime) {\n function cancel() {\n player.finishWork(true);\n router.toJob();\n }\n\n function unfocus() {\n player.stopFocusing();\n router.toJob();\n }\n\n const comp = _Company_Companies__WEBPACK_IMPORTED_MODULE_11__[/* Companies */ \"a\"][player.companyName];\n let companyRep = 0;\n\n if (comp == null || !(comp instanceof _Company_Company__WEBPACK_IMPORTED_MODULE_10__[/* Company */ \"a\"])) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n\n companyRep = comp.playerReputation;\n const position = player.jobs[player.companyName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working as a \", position, \" at \", player.companyName, \" (Current Company Reputation:\", \" \", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(companyRep), \")\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have earned: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_7__[/* Money */ \"a\"], {\n money: player.workMoneyGained\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_MoneyRate__WEBPACK_IMPORTED_MODULE_6__[/* MoneyRate */ \"a\"], {\n money: player.workMoneyGainRate * CYCLES_PER_SEC\n }), \")\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(player.workRepGained), \" (\", Object(_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(`${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workRepGainRate * CYCLES_PER_SEC)} / sec`), \") reputation for this company \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`, \") hacking exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`, \") strength exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`, \") defense exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`, \") dexterity exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`, \") agility exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), _numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGained), \" (\", `${_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`, \") charisma exp \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will be no penalty because this is a part-time job.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: cancel,\n className: \"work-button\"\n }, \"Stop Working\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n onClick: unfocus,\n className: \"work-button\"\n }, \"Do something else simultaneously\"));\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round(player.timeWorked / player.timeNeededToCompleteWork * 100);\n let numBars = Math.round(percent / 5);\n\n if (numBars < 0) {\n numBars = 0;\n }\n\n if (numBars > 20) {\n numBars = 20;\n } // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n\n\n const progressBar = Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_14__[/* createProgressBarText */ \"a\"])({\n progress: (numBars + 1) / 20,\n totalTicks: 20\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are attempting to \", player.crimeType, \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Time remaining: \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeNeededToCompleteWork - player.timeWorked)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, progressBar), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => {\n router.toLocation(_Locations_Locations__WEBPACK_IMPORTED_MODULE_12__[/* Locations */ \"a\"][_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_13__[/* LocationName */ \"a\"].Slums]);\n player.finishCrime(true);\n }\n }, \"Cancel crime\"));\n }\n\n if (player.createProgramName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You are currently working on coding \", player.createProgramName, \".\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"You have been working for \", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_8__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.timeWorked), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"The program is \", (player.timeWorkedCreateProgram / player.timeNeededToCompleteWork * 100).toFixed(2), \"% complete. \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you cancel, your work will be saved and you can come back to complete the program later.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"work-button\",\n onClick: () => {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }\n }, \"Cancel work on creating program\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/ui/WorkInProgressRoot.tsx?"); /***/ }), /* 939 */ @@ -5997,7 +5997,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameOptionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Slider */ 416);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Grid */ 71);\n/* harmony import */ var _mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/FormControlLabel */ 268);\n/* harmony import */ var _mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Switch */ 269);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Select */ 267);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_Link__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Link */ 372);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Tooltip */ 105);\n/* harmony import */ var _Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Diagnostic/FileDiagnosticModal */ 940);\n/* harmony import */ var _ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./ConfirmationModal */ 945);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\"\n }\n}));\nfunction GameOptionsRoot(props) {\n const classes = useStyles();\n const [execTime, setExecTime] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime);\n const [logSize, setLogSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity);\n const [portSize, setPortSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity);\n const [terminalSize, setTerminalSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval);\n const [suppressMessages, setSuppressMessages] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation);\n const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup);\n const [disableHotkeys, setDisableHotkeys] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects);\n const [locale, setLocale] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale);\n const [diagnosticOpen, setDiagnosticOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [deleteGameOpen, setDeleteOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function handleExecTimeChange(event, newValue) {\n setExecTime(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].CodeInstructionRunTime = newValue;\n }\n\n function handleLogSizeChange(event, newValue) {\n setLogSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxLogCapacity = newValue;\n }\n\n function handlePortSizeChange(event, newValue) {\n setPortSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxPortCapacity = newValue;\n }\n\n function handleTerminalSizeChange(event, newValue) {\n setTerminalSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MaxTerminalCapacity = newValue;\n }\n\n function handleAutosaveIntervalChange(event, newValue) {\n setAutosaveInterval(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval = newValue;\n }\n\n function handleSuppressMessagesChange(event) {\n setSuppressMessages(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event) {\n setSuppressFactionInvites(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event) {\n setSuppressTravelConfirmations(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event) {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressHospitalizationPopupChange(event) {\n setSuppressHospitalizationPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressHospitalizationPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event) {\n setSuppressBladeburnerPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event) {\n setDisableHotkeys(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event) {\n setDisableASCIIArt(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event) {\n setDisableTextEffects(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableTextEffects = event.target.checked;\n }\n\n function handleLocaleChange(event) {\n setLocale(event.target.value);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].Locale = event.target.value;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.root,\n style: {\n width: \"90%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n variant: \"h4\",\n gutterBottom: true\n }, \"Options\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript exec time (ms)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: execTime,\n onChange: handleExecTimeChange,\n step: 1,\n min: 10,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript log size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: logSize,\n onChange: handleLogSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript port size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: portSize,\n onChange: handlePortSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Terminal capacity\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: terminalSize,\n onChange: handleTerminalSizeChange,\n step: 50,\n min: 50,\n max: 500,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The time (in seconds) between each autosave. Set to 0 to disable autosave.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Autosave interval (s)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: autosaveInterval,\n onChange: handleAutosaveIntervalChange,\n step: 30,\n min: 0,\n max: 600,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressMessages,\n onChange: handleSuppressMessagesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress messages\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressFactionInvites,\n onChange: handleSuppressFactionInvitesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress faction invites\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressTravelConfirmations,\n onChange: handleSuppressTravelConfirmationsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress travel confirmations\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBuyAugmentationConfirmation,\n onChange: handleSuppressBuyAugmentationConfirmationChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before buying augmentation will not show up.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress buy augmentation confirmation\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressHospitalizationPopup,\n onChange: handleSuppressHospitalizationPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress hospitalization popup\"))\n })), !!props.player.bladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBladeburnerPopup,\n onChange: handleSuppressBladeburnerPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress bladeburner popup\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableHotkeys,\n onChange: handleDisableHotkeysChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the \\\"Save and Close (Ctrl + b)\\\" hotkey in the Text Editor.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable hotkeys\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableASCIIArt,\n onChange: handleDisableASCIIArtChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set all ASCII art will be disabled.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable ascii art\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableTextEffects,\n onChange: handleDisableTextEffectsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable text effects\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Sets the locale for displaying numbers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Locale\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n value: locale,\n onChange: handleLocaleChange\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en\"\n }, \"en\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"bg\"\n }, \"bg\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"cs\"\n }, \"cs\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"da-dk\"\n }, \"da-dk\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"de\"\n }, \"de\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-au\"\n }, \"en-au\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-gb\"\n }, \"en-gb\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"es\"\n }, \"es\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"fr\"\n }, \"fr\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"hu\"\n }, \"hu\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"it\"\n }, \"it\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"lv\"\n }, \"lv\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"no\"\n }, \"no\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"pl\"\n }, \"pl\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"ru\"\n }, \"ru\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"form\", {\n action: \"https://www.paypal.com/cgi-bin/webscr\",\n method: \"post\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"cmd\",\n value: \"_s-xclick\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"encrypted\",\n value: \"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"image\",\n src: \"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\",\n name: \"submit\",\n alt: \"PayPal - The safer, easier way to pay online!\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.save()\n }, \"Save Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDeleteOpen(true)\n }, \"Delete Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.export()\n }, \"Export Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.import()\n }, \"Import Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.forceKill()\n }, \"Force kill all active scripts\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.softReset()\n }, \"Soft Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDiagnosticOpen(true)\n }, \"Diagnose files\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Documentation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://discord.gg/TFc3hKD\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Discord\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n href: \"https://www.reddit.com/r/bitburner\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Reddit\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_16__[/* FileDiagnosticModal */ \"a\"], {\n open: diagnosticOpen,\n onClose: () => setDiagnosticOpen(false)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ConfirmationModal__WEBPACK_IMPORTED_MODULE_17__[/* ConfirmationModal */ \"a\"], {\n onConfirm: () => {\n props.delete();\n setDeleteOpen(false);\n },\n open: deleteGameOpen,\n onClose: () => setDeleteOpen(false),\n confirmationText: \"Really delete your game? (It's permanent!)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/React/GameOptionsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GameOptionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Slider */ 417);\n/* harmony import */ var _mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Grid */ 73);\n/* harmony import */ var _mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/FormControlLabel */ 269);\n/* harmony import */ var _mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Switch */ 270);\n/* harmony import */ var _mui_material_Select__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Select */ 268);\n/* harmony import */ var _mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/MenuItem */ 111);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material_Link__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Link */ 374);\n/* harmony import */ var _mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/material/Tooltip */ 102);\n/* harmony import */ var _mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/Download */ 948);\n/* harmony import */ var _mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @mui/icons-material/Upload */ 949);\n/* harmony import */ var _mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../Diagnostic/FileDiagnosticModal */ 940);\n/* harmony import */ var _ConfirmationModal__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ConfirmationModal */ 945);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\"\n }\n}));\nfunction GameOptionsRoot(props) {\n const classes = useStyles();\n const [execTime, setExecTime] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].CodeInstructionRunTime);\n const [logSize, setLogSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxLogCapacity);\n const [portSize, setPortSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxPortCapacity);\n const [terminalSize, setTerminalSize] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].AutosaveInterval);\n const [suppressMessages, setSuppressMessages] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressMessages);\n const [suppressFactionInvites, setSuppressFactionInvites] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressFactionInvites);\n const [suppressTravelConfirmations, setSuppressTravelConfirmations] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressTravelConfirmation);\n const [suppressBuyAugmentationConfirmation, setSuppressBuyAugmentationConfirmation] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation);\n const [suppressHospitalizationPopup, setSuppressHospitalizationPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressHospitalizationPopup);\n const [suppressBladeburnerPopup, setSuppressBladeburnerPopup] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBladeburnerPopup);\n const [disableHotkeys, setDisableHotkeys] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableHotkeys);\n const [disableASCIIArt, setDisableASCIIArt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableASCIIArt);\n const [disableTextEffects, setDisableTextEffects] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableTextEffects);\n const [locale, setLocale] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].Locale);\n const [diagnosticOpen, setDiagnosticOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [deleteGameOpen, setDeleteOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function handleExecTimeChange(event, newValue) {\n setExecTime(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].CodeInstructionRunTime = newValue;\n }\n\n function handleLogSizeChange(event, newValue) {\n setLogSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxLogCapacity = newValue;\n }\n\n function handlePortSizeChange(event, newValue) {\n setPortSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxPortCapacity = newValue;\n }\n\n function handleTerminalSizeChange(event, newValue) {\n setTerminalSize(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].MaxTerminalCapacity = newValue;\n }\n\n function handleAutosaveIntervalChange(event, newValue) {\n setAutosaveInterval(newValue);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].AutosaveInterval = newValue;\n }\n\n function handleSuppressMessagesChange(event) {\n setSuppressMessages(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressMessages = event.target.checked;\n }\n\n function handleSuppressFactionInvitesChange(event) {\n setSuppressFactionInvites(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressFactionInvites = event.target.checked;\n }\n\n function handleSuppressTravelConfirmationsChange(event) {\n setSuppressTravelConfirmations(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressTravelConfirmation = event.target.checked;\n }\n\n function handleSuppressBuyAugmentationConfirmationChange(event) {\n setSuppressBuyAugmentationConfirmation(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation = event.target.checked;\n }\n\n function handleSuppressHospitalizationPopupChange(event) {\n setSuppressHospitalizationPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressHospitalizationPopup = event.target.checked;\n }\n\n function handleSuppressBladeburnerPopupChange(event) {\n setSuppressBladeburnerPopup(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].SuppressBladeburnerPopup = event.target.checked;\n }\n\n function handleDisableHotkeysChange(event) {\n setDisableHotkeys(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableHotkeys = event.target.checked;\n }\n\n function handleDisableASCIIArtChange(event) {\n setDisableASCIIArt(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableASCIIArt = event.target.checked;\n }\n\n function handleDisableTextEffectsChange(event) {\n setDisableTextEffects(event.target.checked);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].DisableTextEffects = event.target.checked;\n }\n\n function handleLocaleChange(event) {\n setLocale(event.target.value);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_21__[/* Settings */ \"a\"].Locale = event.target.value;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: classes.root,\n style: {\n width: \"90%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n variant: \"h4\",\n gutterBottom: true\n }, \"Options\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n container: true,\n spacing: 3\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too low can result in poor performance if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript exec time (ms)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: execTime,\n onChange: handleExecTimeChange,\n step: 1,\n min: 10,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of lines a script's logs can hold. Setting this too high can cause the game to use a lot of memory if you have many scripts running.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript log size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: logSize,\n onChange: handleLogSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a port using Netscript's write() function. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Netscript port size\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: portSize,\n onChange: handlePortSizeChange,\n step: 1,\n min: 20,\n max: 100,\n valueLabelDisplay: \"auto\"\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The maximum number of entries that can be written to a the terminal. Setting this too high can cause the game to use a lot of memory.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Terminal capacity\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: terminalSize,\n onChange: handleTerminalSizeChange,\n step: 50,\n min: 50,\n max: 500,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"The time (in seconds) between each autosave. Set to 0 to disable autosave.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Autosave interval (s)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Slider__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n value: autosaveInterval,\n onChange: handleAutosaveIntervalChange,\n step: 30,\n min: 0,\n max: 600,\n valueLabelDisplay: \"auto\",\n marks: true\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressMessages,\n onChange: handleSuppressMessagesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any messages you receive will not appear as popups on the screen. They will still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal command.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress messages\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressFactionInvites,\n onChange: handleSuppressFactionInvitesChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then any faction invites you receive will not appear as popups on the screen. Your outstanding faction invites can be viewed in the 'Factions' page.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress faction invites\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressTravelConfirmations,\n onChange: handleSuppressTravelConfirmationsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before traveling will not show up. You will automatically be deducted the travel cost as soon as you click.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress travel confirmations\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBuyAugmentationConfirmation,\n onChange: handleSuppressBuyAugmentationConfirmationChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, the confirmation message before buying augmentation will not show up.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress buy augmentation confirmation\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressHospitalizationPopup,\n onChange: handleSuppressHospitalizationPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, a popup message will no longer be shown when you are hospitalized after taking too much damage.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress hospitalization popup\"))\n })), !!props.player.bladeburner && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: suppressBladeburnerPopup,\n onChange: handleSuppressBladeburnerPopupChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Suppress bladeburner popup\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableHotkeys,\n onChange: handleDisableHotkeysChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes Terminal commands, hotkeys to navigate between different parts of the game, and the \\\"Save and Close (Ctrl + b)\\\" hotkey in the Text Editor.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable hotkeys\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableASCIIArt,\n onChange: handleDisableASCIIArtChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set all ASCII art will be disabled.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable ascii art\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_FormControlLabel__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n control: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Switch__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n checked: disableTextEffects,\n onChange: handleDisableTextEffectsChange\n }),\n label: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Disable text effects\"))\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Sets the locale for displaying numbers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Locale\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Select__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n value: locale,\n onChange: handleLocaleChange\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en\"\n }, \"en\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"bg\"\n }, \"bg\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"cs\"\n }, \"cs\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"da-dk\"\n }, \"da-dk\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"de\"\n }, \"de\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-au\"\n }, \"en-au\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"en-gb\"\n }, \"en-gb\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"es\"\n }, \"es\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"fr\"\n }, \"fr\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"hu\"\n }, \"hu\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"it\"\n }, \"it\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"lv\"\n }, \"lv\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"no\"\n }, \"no\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"pl\"\n }, \"pl\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_MenuItem__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n value: \"ru\"\n }, \"ru\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"form\", {\n action: \"https://www.paypal.com/cgi-bin/webscr\",\n method: \"post\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"cmd\",\n value: \"_s-xclick\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"hidden\",\n name: \"encrypted\",\n value: \"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIhvcNAQEFBQAwgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMB4XDTA0MDIxMzEwMTMxNVoXDTM1MDIxMzEwMTMxNVowgY4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEWMBQGA1UEBxMNTW91bnRhaW4gVmlldzEUMBIGA1UEChMLUGF5UGFsIEluYy4xEzARBgNVBAsUCmxpdmVfY2VydHMxETAPBgNVBAMUCGxpdmVfYXBpMRwwGgYJKoZIhvcNAQkBFg1yZUBwYXlwYWwuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDBR07d/ETMS1ycjtkpkvjXZe9k+6CieLuLsPumsJ7QC1odNz3sJiCbs2wC0nLE0uLGaEtXynIgRqIddYCHx88pb5HTXv4SZeuv0Rqq4+axW9PLAAATU8w04qqjaSXgbGLP3NmohqM6bV9kZZwZLR/klDaQGo1u9uDb9lr4Yn+rBQIDAQABo4HuMIHrMB0GA1UdDgQWBBSWn3y7xm8XvVk/UtcKG+wQ1mSUazCBuwYDVR0jBIGzMIGwgBSWn3y7xm8XvVk/UtcKG+wQ1mSUa6GBlKSBkTCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"image\",\n src: \"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif\",\n name: \"submit\",\n alt: \"PayPal - The safer, easier way to pay online!\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Grid__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n item: true,\n xs: 12,\n sm: 6\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.save()\n }, \"Save Game\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDeleteOpen(true)\n }, \"Delete Game\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"export\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => props.export()\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Download__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"import\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => props.import()\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Upload__WEBPACK_IMPORTED_MODULE_18___default.a, {\n color: \"primary\"\n })))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the game. After using this, save the game and then reload the page. This is different then normal kill in that normal kill will tell the script to shut down while force kill just removes the references to it (and it should crash on it's own). This will not remove the files on your computer. Just forcefully kill all running instance of all scripts.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.forceKill()\n }, \"Force kill all active scripts\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Perform a soft reset. Resets everything as if you had just purchased an Augmentation.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => props.softReset()\n }, \"Soft Reset\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"], {\n title: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"If your save file is extremely big you can use this button to view a map of all the files on every server. Be careful there might be spoilers.\")\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: () => setDiagnosticOpen(true)\n }, \"Diagnose files\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Documentation\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://bitburner.readthedocs.io/en/latest/changelog.html\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Changelog\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://discord.gg/TFc3hKD\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Discord\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Link__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n href: \"https://www.reddit.com/r/bitburner\",\n target: \"_blank\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"Reddit\"))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Diagnostic_FileDiagnosticModal__WEBPACK_IMPORTED_MODULE_19__[/* FileDiagnosticModal */ \"a\"], {\n open: diagnosticOpen,\n onClose: () => setDiagnosticOpen(false)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ConfirmationModal__WEBPACK_IMPORTED_MODULE_20__[/* ConfirmationModal */ \"a\"], {\n onConfirm: () => {\n props.delete();\n setDeleteOpen(false);\n },\n open: deleteGameOpen,\n onClose: () => setDeleteOpen(false),\n confirmationText: \"Really delete your game? (It's permanent!)\"\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/React/GameOptionsRoot.tsx?"); /***/ }), /* 940 */ @@ -6009,7 +6009,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FileDiagnosticModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Modal */ 461);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableContainer */ 1381);\n/* harmony import */ var _mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableHead */ 1382);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][props.ip];\n let totalSize = 0;\n\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const files = [];\n\n for (const f of server.scripts) {\n files.push({\n name: f.filename,\n size: f.code.length\n });\n }\n\n for (const f of server.textFiles) {\n files.push({\n name: f.fn,\n size: f.text.length\n });\n }\n\n files.sort((a, b) => b.size - a.size);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, server.hostname, \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(totalSize), \"b)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Filename\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Size\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, files.map(file => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n key: file.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, file.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(file.size), \"b\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null)));\n}\nfunction FileDiagnosticModal(props) {\n const ips = [];\n\n for (const ip of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"])) {\n ips.push(ip);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are.\"), ips.map(ip => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ServerAccordion, {\n key: ip,\n ip: ip\n }))));\n}\n\n//# sourceURL=webpack:///./src/Diagnostic/FileDiagnosticModal.tsx?"); +eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FileDiagnosticModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Modal */ 462);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableContainer */ 1384);\n/* harmony import */ var _mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableHead */ 1385);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Accordion */ 160);\n/* harmony import */ var _mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/AccordionSummary */ 161);\n/* harmony import */ var _mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/AccordionDetails */ 162);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15__);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const server = _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"][props.ip];\n let totalSize = 0;\n\n for (const f of server.scripts) {\n totalSize += f.code.length;\n }\n\n for (const f of server.textFiles) {\n totalSize += f.text.length;\n }\n\n if (totalSize === 0) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const files = [];\n\n for (const f of server.scripts) {\n files.push({\n name: f.filename,\n size: f.code.length\n });\n }\n\n for (const f of server.textFiles) {\n files.push({\n name: f.fn,\n size: f.text.length\n });\n }\n\n files.sort((a, b) => b.size - a.size);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Accordion__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n TransitionProps: {\n unmountOnExit: true\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionSummary__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n expandIcon: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_15___default.a, null)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, server.hostname, \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(totalSize), \"b)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_AccordionDetails__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableContainer__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableHead__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Filename\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Size\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, files.map(file => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n key: file.name\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, file.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatBigNumber(file.size), \"b\"))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null)));\n}\nfunction FileDiagnosticModal(props) {\n const ips = [];\n\n for (const ip of Object.keys(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AllServers */ \"b\"])) {\n ips.push(ip);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Modal__WEBPACK_IMPORTED_MODULE_2__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Welcome to the file diagnostic! If your save file is really big it's likely because you have too many text/scripts. This tool can help you narrow down where they are.\"), ips.map(ip => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ServerAccordion, {\n key: ip,\n ip: ip\n }))));\n}\n\n//# sourceURL=webpack:///./src/Diagnostic/FileDiagnosticModal.tsx?"); /***/ }), /* 941 */, @@ -6025,12 +6025,14 @@ eval("/* unused harmony export ServerAccordion */\n/* harmony export (binding) * /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConfirmationModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Modal */ 461);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n\n\n\n\nfunction ConfirmationModal(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_1__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, props.confirmationText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => {\n props.onConfirm();\n }\n }, \"Confirm\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/ConfirmationModal.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ConfirmationModal; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Modal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Modal */ 462);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n\n\n\n\nfunction ConfirmationModal(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Modal__WEBPACK_IMPORTED_MODULE_1__[/* Modal */ \"a\"], {\n open: props.open,\n onClose: props.onClose\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, props.confirmationText), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => {\n props.onConfirm();\n }\n }, \"Confirm\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/ConfirmationModal.tsx?"); /***/ }), /* 946 */, /* 947 */, -/* 948 */ +/* 948 */, +/* 949 */, +/* 950 */ /*!****************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx ***! \****************************************************/ @@ -6039,10 +6041,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/SleeveElem */ 949);\n\n\nfunction SleeveRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Sleeves\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sleeves can be used to perform different tasks synchronously.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"FAQ\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves\"\n }, \"Documentation\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.sleeves.map((sleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__[/* SleeveElem */ \"a\"], {\n rerender: rerender,\n player: props.player,\n sleeve: sleeve\n })))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/SleeveElem */ 951);\n\n\nfunction SleeveRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Sleeves\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In other words, these Synthoids contain a perfect duplicate of your mind.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Sleeves can be used to perform different tasks synchronously.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n }\n }, \"FAQ\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves\"\n }, \"Documentation\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.sleeves.map((sleeve, i) => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_SleeveElem__WEBPACK_IMPORTED_MODULE_1__[/* SleeveElem */ \"a\"], {\n rerender: rerender,\n player: props.player,\n sleeve: sleeve\n })))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx?"); /***/ }), -/* 949 */ +/* 951 */ /*!****************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/SleeveElem.tsx ***! \****************************************************/ @@ -6051,10 +6053,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/helpers/createProgressBarText */ 127);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/SleeveAugmentationsPopup */ 950);\n/* harmony import */ var _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/TravelPopup */ 951);\n/* harmony import */ var _ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/EarningsTableElement */ 952);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../ui/React/ReputationRate */ 401);\n/* harmony import */ var _ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ui/StatsElement */ 953);\n/* harmony import */ var _ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/MoreStatsContent */ 954);\n/* harmony import */ var _ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/MoreEarningsContent */ 955);\n/* harmony import */ var _ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/TaskSelector */ 956);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction SleeveElem(props) {\n const [abc, setABC] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([\"------\", \"------\", \"------\"]);\n\n function openMoreStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__[/* MoreStatsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function openTravel() {\n const popupId = \"sleeve-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__[/* TravelPopup */ \"a\"], {\n popupId: popupId,\n sleeve: props.sleeve,\n player: props.player,\n rerender: props.rerender\n });\n }\n\n function openManageAugmentations() {\n const popupId = \"sleeve-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__[/* SleeveAugmentationsPopup */ \"a\"], {\n sleeve: props.sleeve,\n player: props.player\n });\n }\n\n function openMoreEarnings() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__[/* MoreEarningsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function setTask() {\n props.sleeve.resetTaskStatus(); // sets to idle\n\n switch (abc[0]) {\n case \"------\":\n break;\n\n case \"Work for Company\":\n props.sleeve.workForCompany(props.player, abc[1]);\n break;\n\n case \"Work for Faction\":\n props.sleeve.workForFaction(props.player, abc[1], abc[2]);\n break;\n\n case \"Commit Crime\":\n props.sleeve.commitCrime(props.player, abc[1]);\n break;\n\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);\n break;\n\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);\n break;\n\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(props.player);\n break;\n\n case \"Synchronize\":\n props.sleeve.synchronize(props.player);\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n\n props.rerender();\n }\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n switch (props.sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently idle\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working your job at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let doing = \"nothing\";\n\n switch (props.sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Field:\n doing = \"Field work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Hacking:\n doing = \"Hacking contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Security:\n doing = \"Security work\";\n break;\n }\n\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently doing \", doing, \" for \", props.sleeve.currentTaskLocation, \".\");\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently attempting to \", _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].type, \" (Success Rate:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].successRate(props.sleeve)), \").\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently studying/taking a course at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working out at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.\");\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data = [];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime) {\n data = [[`Money`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_11__[/* Money */ \"a\"], {\n money: parseFloat(props.sleeve.currentTaskLocation)\n }), `(on success)`], [`Hacking Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`], [`Dexterity Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`], [`Agility Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`], [`Charisma Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`]]; // elems.taskProgressBar.innerText = createProgressBarText({\n // progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n // totalTicks: 25,\n // });\n } else {\n data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__[/* MoneyRate */ \"a\"], {\n money: 5 * props.sleeve.gainRatesForTask.money\n })], [`Hacking Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`], [`Strength Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`], [`Defense Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`], [`Dexterity Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`], [`Agility Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`], [`Charisma Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`]];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company || props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n const repGain = props.sleeve.getRepGain(props.player);\n data.push([`Reputation:`, Object(_ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__[/* ReputationRate */ \"a\"])(5 * repGain)]);\n } // elems.taskProgressBar.innerText = \"\";\n\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-elem\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"25%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-stats-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__[/* StatsElement */ \"a\"], {\n sleeve: props.sleeve\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreStats\n }, \"More Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) ? \" tooltip\" : \"\"}`,\n onClick: openTravel,\n disabled: props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost)\n }, \"Travel\", props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Not enough money\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.sleeve.shock < 100 ? \" tooltip\" : \"\"}`,\n onClick: openManageAugmentations,\n style: {\n display: \"block\"\n },\n disabled: props.sleeve.shock < 100\n }, \"Manage Augmentations\", props.sleeve.shock < 100 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Unlocked when sleeve has fully recovered\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"40%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__[/* TaskSelector */ \"a\"], {\n player: props.player,\n sleeve: props.sleeve,\n setABC: setABC\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime && Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__[/* createProgressBarText */ \"a\"])({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: setTask\n }, \"Set Task\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"35%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__[/* EarningsTableElement */ \"a\"], {\n title: \"Earnings (Pre-Synchronization)\",\n stats: data\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreEarnings\n }, \"More Earnings Info\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../utils/helpers/createProgressBarText */ 128);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/SleeveAugmentationsPopup */ 952);\n/* harmony import */ var _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/TravelPopup */ 953);\n/* harmony import */ var _ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ui/EarningsTableElement */ 954);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../ui/React/ReputationRate */ 402);\n/* harmony import */ var _ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ui/StatsElement */ 955);\n/* harmony import */ var _ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ui/MoreStatsContent */ 956);\n/* harmony import */ var _ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../ui/MoreEarningsContent */ 957);\n/* harmony import */ var _ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../ui/TaskSelector */ 958);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 126);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction SleeveElem(props) {\n const [abc, setABC] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([\"------\", \"------\", \"------\"]);\n\n function openMoreStats() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreStatsContent__WEBPACK_IMPORTED_MODULE_15__[/* MoreStatsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function openTravel() {\n const popupId = \"sleeve-travel-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_TravelPopup__WEBPACK_IMPORTED_MODULE_9__[/* TravelPopup */ \"a\"], {\n popupId: popupId,\n sleeve: props.sleeve,\n player: props.player,\n rerender: props.rerender\n });\n }\n\n function openManageAugmentations() {\n const popupId = \"sleeve-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _ui_SleeveAugmentationsPopup__WEBPACK_IMPORTED_MODULE_8__[/* SleeveAugmentationsPopup */ \"a\"], {\n sleeve: props.sleeve,\n player: props.player\n });\n }\n\n function openMoreEarnings() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_MoreEarningsContent__WEBPACK_IMPORTED_MODULE_16__[/* MoreEarningsContent */ \"a\"], {\n sleeve: props.sleeve\n }));\n }\n\n function setTask() {\n props.sleeve.resetTaskStatus(); // sets to idle\n\n switch (abc[0]) {\n case \"------\":\n break;\n\n case \"Work for Company\":\n props.sleeve.workForCompany(props.player, abc[1]);\n break;\n\n case \"Work for Faction\":\n props.sleeve.workForFaction(props.player, abc[1], abc[2]);\n break;\n\n case \"Commit Crime\":\n props.sleeve.commitCrime(props.player, abc[1]);\n break;\n\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(props.player, abc[2], abc[1]);\n break;\n\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(props.player, abc[2], abc[1]);\n break;\n\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(props.player);\n break;\n\n case \"Synchronize\":\n props.sleeve.synchronize(props.player);\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n\n props.rerender();\n }\n\n let desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n switch (props.sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently idle\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working your job at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let doing = \"nothing\";\n\n switch (props.sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Field:\n doing = \"Field work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Hacking:\n doing = \"Hacking contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_18__[/* FactionWorkType */ \"a\"].Security:\n doing = \"Security work\";\n break;\n }\n\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently doing \", doing, \" for \", props.sleeve.currentTaskLocation, \".\");\n break;\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently attempting to \", _Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].type, \" (Success Rate:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatPercentage(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_3__[/* Crimes */ \"a\"][props.sleeve.crimeType].successRate(props.sleeve)), \").\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently studying/taking a course at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently working out at \", props.sleeve.currentTaskLocation, \".\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a faster rate.\");\n break;\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n desc = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.\");\n break;\n\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n let data = [];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime) {\n data = [[`Money`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_11__[/* Money */ \"a\"], {\n money: parseFloat(props.sleeve.currentTaskLocation)\n }), `(on success)`], [`Hacking Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.hack), `(2x on success)`], [`Strength Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.str), `(2x on success)`], [`Defense Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.def), `(2x on success)`], [`Dexterity Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.dex), `(2x on success)`], [`Agility Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.agi), `(2x on success)`], [`Charisma Exp`, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.gainRatesForTask.cha), `(2x on success)`]]; // elems.taskProgressBar.innerText = createProgressBarText({\n // progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n // totalTicks: 25,\n // });\n } else {\n data = [[`Money:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_12__[/* MoneyRate */ \"a\"], {\n money: 5 * props.sleeve.gainRatesForTask.money\n })], [`Hacking Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.hack)} / s`], [`Strength Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.str)} / s`], [`Defense Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.def)} / s`], [`Dexterity Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.dex)} / s`], [`Agility Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.agi)} / s`], [`Charisma Exp:`, `${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_4__[/* numeralWrapper */ \"a\"].formatExp(5 * props.sleeve.gainRatesForTask.cha)} / s`]];\n\n if (props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company || props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n const repGain = props.sleeve.getRepGain(props.player);\n data.push([`Reputation:`, Object(_ui_React_ReputationRate__WEBPACK_IMPORTED_MODULE_13__[/* ReputationRate */ \"a\"])(5 * repGain)]);\n } // elems.taskProgressBar.innerText = \"\";\n\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-elem\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"25%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-stats-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_StatsElement__WEBPACK_IMPORTED_MODULE_14__[/* StatsElement */ \"a\"], {\n sleeve: props.sleeve\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreStats\n }, \"More Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) ? \" tooltip\" : \"\"}`,\n onClick: openTravel,\n disabled: props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost)\n }, \"Travel\", props.player.money.lt(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TravelCost) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Not enough money\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: `std-button${props.sleeve.shock < 100 ? \" tooltip\" : \"\"}`,\n onClick: openManageAugmentations,\n style: {\n display: \"block\"\n },\n disabled: props.sleeve.shock < 100\n }, \"Manage Augmentations\", props.sleeve.shock < 100 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Unlocked when sleeve has fully recovered\")))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"40%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_TaskSelector__WEBPACK_IMPORTED_MODULE_17__[/* TaskSelector */ \"a\"], {\n player: props.player,\n sleeve: props.sleeve,\n setABC: setABC\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, props.sleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime && Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_6__[/* createProgressBarText */ \"a\"])({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: setTask\n }, \"Set Task\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"sleeve-panel\",\n style: {\n width: \"35%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_EarningsTableElement__WEBPACK_IMPORTED_MODULE_10__[/* EarningsTableElement */ \"a\"], {\n title: \"Earnings (Pre-Synchronization)\",\n stats: data\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: openMoreEarnings\n }, \"More Earnings Info\")));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx?"); /***/ }), -/* 950 */ +/* 952 */ /*!******************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/SleeveAugmentationsPopup.tsx ***! \******************************************************************/ @@ -6063,10 +6065,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveAugmentationsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveHelpers */ 441);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom/server */ 411);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom_server__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction SleeveAugmentationsPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []); // Array of all owned Augmentations. Names only\n\n const ownedAugNames = props.sleeve.augmentations.map(e => e.name); // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const availableAugs = Object(_SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findSleevePurchasableAugs */ \"a\"])(props.sleeve, props.player);\n\n function purchaseAugmentation(aug) {\n props.sleeve.tryBuyAugmentation(props.player, aug);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Owned Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\"\n }\n }, ownedAugNames.map(augName => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n let tooltip = aug.info;\n\n if (typeof tooltip !== \"string\") {\n tooltip = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(tooltip);\n }\n\n tooltip += \"

\";\n tooltip += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: augName,\n className: \"gang-owned-upgrade tooltip\"\n }, augName, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: tooltip\n }\n }));\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience.\"), availableAugs.map(aug => {\n let info = aug.info;\n\n if (typeof info !== \"string\") {\n info = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(info);\n }\n\n info += \"

\";\n info += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: aug.name,\n className: \"cmpy-mgmt-upgrade-div\",\n onClick: () => purchaseAugmentation(aug)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n fontSize: \"12px\",\n padding: \"2px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: aug.startingCost,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: info\n }\n })));\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SleeveAugmentationsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveHelpers */ 442);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-dom/server */ 412);\n/* harmony import */ var react_dom_server__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_dom_server__WEBPACK_IMPORTED_MODULE_4__);\n\n\n\n\n\nfunction SleeveAugmentationsPopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []); // Array of all owned Augmentations. Names only\n\n const ownedAugNames = props.sleeve.augmentations.map(e => e.name); // You can only purchase Augmentations that are actually available from\n // your factions. I.e. you must be in a faction that has the Augmentation\n // and you must also have enough rep in that faction in order to purchase it.\n\n const availableAugs = Object(_SleeveHelpers__WEBPACK_IMPORTED_MODULE_1__[/* findSleevePurchasableAugs */ \"a\"])(props.sleeve, props.player);\n\n function purchaseAugmentation(aug) {\n props.sleeve.tryBuyAugmentation(props.player, aug);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"Owned Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"70%\"\n }\n }, ownedAugNames.map(augName => {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n let tooltip = aug.info;\n\n if (typeof tooltip !== \"string\") {\n tooltip = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(tooltip);\n }\n\n tooltip += \"

\";\n tooltip += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: augName,\n className: \"gang-owned-upgrade tooltip\"\n }, augName, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\",\n dangerouslySetInnerHTML: {\n __html: tooltip\n }\n }));\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they would for you. You can only purchase Augmentations that you have unlocked through Factions.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the Duplicate Sleeve will immediately lose all of its stat experience.\"), availableAugs.map(aug => {\n let info = aug.info;\n\n if (typeof info !== \"string\") {\n info = Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(info);\n }\n\n info += \"

\";\n info += Object(react_dom_server__WEBPACK_IMPORTED_MODULE_4__[\"renderToStaticMarkup\"])(aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n key: aug.name,\n className: \"cmpy-mgmt-upgrade-div\",\n onClick: () => purchaseAugmentation(aug)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n fontSize: \"12px\",\n padding: \"2px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Cost: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: aug.startingCost,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n dangerouslySetInnerHTML: {\n __html: info\n }\n })));\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsPopup.tsx?"); /***/ }), -/* 951 */ +/* 953 */ /*!*****************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/TravelPopup.tsx ***! \*****************************************************/ @@ -6075,10 +6077,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/WorldMap */ 348);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n if (!props.player.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to have this sleeve travel to another city\");\n }\n\n props.sleeve.city = city;\n props.player.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost);\n props.sleeve.resetTaskStatus();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.player\n }), \". It will also set your current sleeve task to idle.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__[/* WorldMap */ \"a\"], {\n currentCity: props.sleeve.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TravelPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../Constants */ 5);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/WorldMap */ 350);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\n\n\n\n\n\n\nfunction TravelPopup(props) {\n function travel(city) {\n if (!props.player.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_5__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to have this sleeve travel to another city\");\n }\n\n props.sleeve.city = city;\n props.player.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost);\n props.sleeve.resetTaskStatus();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can study. Traveling to a different city costs \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost,\n player: props.player\n }), \". It will also set your current sleeve task to idle.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_WorldMap__WEBPACK_IMPORTED_MODULE_4__[/* WorldMap */ \"a\"], {\n currentCity: props.sleeve.city,\n onTravel: city => travel(city)\n }));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TravelPopup.tsx?"); /***/ }), -/* 952 */ +/* 954 */ /*!**************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx ***! \**************************************************************/ @@ -6090,7 +6092,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return EarningsTableElement; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction EarningsTableElement(props) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, props.title), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, props.stats.map((stat, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", {\n key: i\n }, stat.map((s, i) => {\n let style = {};\n\n if (i !== 0) {\n style = {\n textAlign: \"right\"\n };\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n style: style,\n key: i\n }, s);\n }))))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/EarningsTableElement.tsx?"); /***/ }), -/* 953 */ +/* 955 */ /*!******************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/StatsElement.tsx ***! \******************************************************/ @@ -6102,7 +6104,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StatsElement; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\nfunction StatsElement(props) {\n let style = {};\n style = {\n textAlign: \"right\"\n };\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_1__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hp-cell\"\n }, \"HP: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hp-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHp(props.sleeve.hp), \" / \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatHp(props.sleeve.max_hp))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", null, \"City: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n style: style\n }, props.sleeve.city)), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hack-cell\"\n }, \"Hacking: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-hack-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.hacking_skill))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Strength: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.strength))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Defense: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.defense))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Dexterity: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.dexterity))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\"\n }, \"Agility: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-combat-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.agility))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-cha-cell\"\n }, \"Charisma: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-cha-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSkill(props.sleeve.charisma))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Shock: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveShock(100 - props.sleeve.shock))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Sync: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveSynchro(props.sleeve.sync))), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\"\n }, \"Memory: \"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"td\", {\n className: \"character-int-cell\",\n style: style\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatSleeveMemory(props.sleeve.memory))))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx?"); /***/ }), -/* 954 */ +/* 956 */ /*!**********************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx ***! \**********************************************************/ @@ -6114,7 +6116,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoreStatsContent; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/React/StatsTable */ 186);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nfunction MoreStatsContent(props) {\n return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__[/* StatsTable */ \"a\"])([[\"Hacking: \", props.sleeve.hacking_skill, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.hacking_exp)} exp)`], [\"Strength: \", props.sleeve.strength, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.strength_exp)} exp)`], [\"Defense: \", props.sleeve.defense, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.defense_exp)} exp)`], [\"Dexterity: \", props.sleeve.dexterity, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.dexterity_exp)} exp)`], [\"Agility: \", props.sleeve.agility, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.agility_exp)} exp)`], [\"Charisma: \", props.sleeve.charisma, `(${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.charisma_exp)} exp)`]], \"Stats:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_1__[/* StatsTable */ \"a\"])([[\"Hacking Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.hacking_mult)], [\"Hacking Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.hacking_exp_mult)], [\"Strength Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.strength_mult)], [\"Strength Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.strength_exp_mult)], [\"Defense Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.defense_mult)], [\"Defense Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.defense_exp_mult)], [\"Dexterity Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.dexterity_mult)], [\"Dexterity Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.dexterity_exp_mult)], [\"Agility Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.agility_mult)], [\"Agility Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.agility_exp_mult)], [\"Charisma Level multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.charisma_mult)], [\"Charisma Experience multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.charisma_exp_mult)], [\"Faction Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.faction_rep_mult)], [\"Company Reputation Gain multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.company_rep_mult)], [\"Salary multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.work_money_mult)], [\"Crime Money multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.crime_money_mult)], [\"Crime Success multiplier: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatPercentage(props.sleeve.crime_success_mult)]], \"Multipliers:\"));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsContent.tsx?"); /***/ }), -/* 955 */ +/* 957 */ /*!*************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx ***! \*************************************************************/ @@ -6126,7 +6128,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MoreEarningsContent; });\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/StatsTable */ 186);\n\n\n\n\nfunction MoreEarningsContent(props) {\n return react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], null, Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForTask.money\n })], [\"Hacking Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.hack)], [\"Strength Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.str)], [\"Defense Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.def)], [\"Dexterity Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.dex)], [\"Agility Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.agi)], [\"Charisma Exp \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForTask.cha)]], \"Earnings for Current Task:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money: \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForPlayer.money\n })], [\"Hacking Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.hack)], [\"Strength Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.str)], [\"Defense Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.def)], [\"Dexterity Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.dex)], [\"Agility Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.agi)], [\"Charisma Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForPlayer.cha)]], \"Total Earnings for Host Consciousness:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null), Object(_ui_React_StatsTable__WEBPACK_IMPORTED_MODULE_3__[/* StatsTable */ \"a\"])([[\"Money: \", react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: props.sleeve.earningsForSleeves.money\n })], [\"Hacking Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.hack)], [\"Strength Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.str)], [\"Defense Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.def)], [\"Dexterity Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.dex)], [\"Agility Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.agi)], [\"Charisma Exp: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_0__[/* numeralWrapper */ \"a\"].formatExp(props.sleeve.earningsForSleeves.cha)]], \"Total Earnings for Other Sleeves:\"), react__WEBPACK_IMPORTED_MODULE_2__[\"createElement\"](\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsContent.tsx?"); /***/ }), -/* 956 */ +/* 958 */ /*!******************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/TaskSelector.tsx ***! \******************************************************/ @@ -6135,10 +6137,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 125);\n\n\n\n\n\n\n\nconst universitySelectorOptions = [\"Study Computer Science\", \"Data Structures\", \"Networks\", \"Algorithms\", \"Management\", \"Leadership\"];\nconst gymSelectorOptions = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nfunction possibleJobs(player, sleeve) {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const allJobs = Object.keys(player.jobs);\n\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player, sleeve) {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks = {\n \"------\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n \"Work for Company\": (player, sleeve) => {\n let jobs = possibleJobs(player, sleeve);\n if (jobs.length === 0) jobs = [\"------\"];\n return {\n first: jobs,\n second: () => [\"------\"]\n };\n },\n \"Work for Faction\": (player, sleeve) => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n return {\n first: factions,\n second: s1 => {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__[/* Factions */ \"a\"][s1];\n const facInfo = faction.getInfo();\n const options = [];\n\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n\n return options;\n }\n };\n },\n \"Commit Crime\": () => {\n return {\n first: Object.keys(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__[/* Crimes */ \"a\"]),\n second: () => [\"------\"]\n };\n },\n \"Take University Course\": (player, sleeve) => {\n let universities = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSummitUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12RothmanUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology];\n break;\n\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return {\n first: universitySelectorOptions,\n second: () => universities\n };\n },\n \"Workout at Gym\": (player, sleeve) => {\n let gyms = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumCrushFitnessGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSnapFitnessGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12IronGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12PowerhouseGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym];\n break;\n\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return {\n first: gymSelectorOptions,\n second: () => gyms\n };\n },\n \"Shock Recovery\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n Synchronize: () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n }\n};\nconst canDo = {\n \"------\": () => true,\n \"Work for Company\": (player, sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player, sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player, sleeve) => sleeve.shock < 100,\n Synchronize: (player, sleeve) => sleeve.sync < 100\n};\n\nfunction getABC(sleeve) {\n switch (sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n return [\"------\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let workType = \"\";\n\n switch (sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Hacking:\n workType = \"Hacking Contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Field:\n workType = \"Field Work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Security:\n workType = \"Security Work\";\n break;\n }\n\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nfunction TaskSelector(props) {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[0]);\n const [s1, setS1] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[1]);\n const [s2, setS2] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[2]);\n const validActions = Object.keys(canDo).filter(k => canDo[k](props.player, props.sleeve));\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event) {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event) {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event) {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS0Change,\n defaultValue: s0\n }, validActions.map(task => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: task,\n value: task\n }, task))), !(details.first.length === 1 && details.first[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS1Change,\n defaultValue: s1\n }, details.first.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))), !(details2.length === 1 && details2[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS2Change,\n defaultValue: s2\n }, details2.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TaskSelector; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SleeveTaskTypesEnum */ 55);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../Crime/Crimes */ 60);\n/* harmony import */ var _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Locations/data/LocationNames */ 9);\n/* harmony import */ var _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Locations/data/CityNames */ 21);\n/* harmony import */ var _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../Faction/Factions */ 22);\n/* harmony import */ var _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../Faction/FactionWorkTypeEnum */ 126);\n\n\n\n\n\n\n\nconst universitySelectorOptions = [\"Study Computer Science\", \"Data Structures\", \"Networks\", \"Algorithms\", \"Management\", \"Leadership\"];\nconst gymSelectorOptions = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\nfunction possibleJobs(player, sleeve) {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const allJobs = Object.keys(player.jobs);\n\n for (let i = 0; i < allJobs.length; ++i) {\n if (!forbiddenCompanies.includes(allJobs[i])) {\n allJobs[i];\n }\n }\n\n return allJobs;\n}\n\nfunction possibleFactions(player, sleeve) {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [\"Bladeburners\"];\n\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n\n if (otherSleeve.currentTask === _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions;\n}\n\nconst tasks = {\n \"------\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n \"Work for Company\": (player, sleeve) => {\n let jobs = possibleJobs(player, sleeve);\n if (jobs.length === 0) jobs = [\"------\"];\n return {\n first: jobs,\n second: () => [\"------\"]\n };\n },\n \"Work for Faction\": (player, sleeve) => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n return {\n first: factions,\n second: s1 => {\n const faction = _Faction_Factions__WEBPACK_IMPORTED_MODULE_5__[/* Factions */ \"a\"][s1];\n const facInfo = faction.getInfo();\n const options = [];\n\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n\n return options;\n }\n };\n },\n \"Commit Crime\": () => {\n return {\n first: Object.keys(_Crime_Crimes__WEBPACK_IMPORTED_MODULE_2__[/* Crimes */ \"a\"]),\n second: () => [\"------\"]\n };\n },\n \"Take University Course\": (player, sleeve) => {\n let universities = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSummitUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12RothmanUniversity];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n universities = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenZBInstituteOfTechnology];\n break;\n\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return {\n first: universitySelectorOptions,\n second: () => universities\n };\n },\n \"Workout at Gym\": (player, sleeve) => {\n let gyms = [];\n\n switch (sleeve.city) {\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumCrushFitnessGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].AevumSnapFitnessGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12IronGym, _Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12PowerhouseGym];\n break;\n\n case _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven:\n gyms = [_Locations_data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].VolhavenMilleniumFitnessGym];\n break;\n\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return {\n first: gymSelectorOptions,\n second: () => gyms\n };\n },\n \"Shock Recovery\": () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n },\n Synchronize: () => {\n return {\n first: [\"------\"],\n second: () => [\"------\"]\n };\n }\n};\nconst canDo = {\n \"------\": () => true,\n \"Work for Company\": (player, sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player, sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player, sleeve) => [_Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Aevum, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Sector12, _Locations_data_CityNames__WEBPACK_IMPORTED_MODULE_4__[/* CityName */ \"a\"].Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player, sleeve) => sleeve.shock < 100,\n Synchronize: (player, sleeve) => sleeve.sync < 100\n};\n\nfunction getABC(sleeve) {\n switch (sleeve.currentTask) {\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Idle:\n return [\"------\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Faction:\n {\n let workType = \"\";\n\n switch (sleeve.factionWorkType) {\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Hacking:\n workType = \"Hacking Contracts\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Field:\n workType = \"Field Work\";\n break;\n\n case _Faction_FactionWorkTypeEnum__WEBPACK_IMPORTED_MODULE_6__[/* FactionWorkType */ \"a\"].Security:\n workType = \"Security Work\";\n break;\n }\n\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n\n case _SleeveTaskTypesEnum__WEBPACK_IMPORTED_MODULE_1__[/* SleeveTaskType */ \"a\"].Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nfunction TaskSelector(props) {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[0]);\n const [s1, setS1] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[1]);\n const [s2, setS2] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(abc[2]);\n const validActions = Object.keys(canDo).filter(k => canDo[k](props.player, props.sleeve));\n const detailsF = tasks[s0];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(s1);\n\n if (details.first.length > 0 && !details.first.includes(s1)) {\n setS1(details.first[0]);\n props.setABC([s0, details.first[0], s2]);\n }\n\n if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event) {\n const n = event.target.value;\n const detailsF = tasks[n];\n if (detailsF === undefined) throw new Error(`No function for task '${s0}'`);\n const details = detailsF(props.player, props.sleeve);\n const details2 = details.second(details.first[0]);\n setS2(details2[0]);\n setS1(details.first[0]);\n setS0(n);\n props.setABC([n, details.first[0], details2[0]]);\n }\n\n function onS1Change(event) {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event) {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS0Change,\n defaultValue: s0\n }, validActions.map(task => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: task,\n value: task\n }, task))), !(details.first.length === 1 && details.first[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS1Change,\n defaultValue: s1\n }, details.first.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))), !(details2.length === 1 && details2[0] === \"------\") && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: onS2Change,\n defaultValue: s2\n }, details2.map(detail => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n key: detail,\n value: detail\n }, detail))));\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx?"); /***/ }), -/* 957 */ +/* 959 */ /*!****************************************!*\ !*** ./src/Hacknet/ui/HacknetRoot.tsx ***! \****************************************/ @@ -6147,10 +6149,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralInfo */ 958);\n/* harmony import */ var _HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HacknetNodeElem */ 959);\n/* harmony import */ var _HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HacknetServerElem */ 960);\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HacknetNode */ 248);\n/* harmony import */ var _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashUpgradePopup */ 961);\n/* harmony import */ var _MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MultiplierButtons */ 963);\n/* harmony import */ var _PlayerInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PlayerInfo */ 964);\n/* harmony import */ var _PurchaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseButton */ 965);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Root React Component for the Hacknet Node UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction HacknetRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [purchaseMultiplier, setPurchaseMultiplier] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function createHashUpgradesPopup() {\n const id = \"hacknet-server-hash-upgrades-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(id, _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__[/* HashUpgradePopup */ \"a\"], {\n player: props.player\n });\n }\n\n let totalProduction = 0;\n\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was a normal server\"); // should never happen\n\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick() {\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* purchaseHacknet */ \"l\"])(props.player);\n rerender();\n } // Cost to purchase a new Hacknet Node\n\n\n let purchaseCost;\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetServer */ \"b\"])(props.player);\n } else {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetNode */ \"a\"])(props.player);\n } // onClick event handlers for purchase multiplier buttons\n\n\n const purchaseMultiplierOnClicks = [() => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x5), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x10), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].MAX)]; // HacknetNode components\n\n const nodes = props.player.hacknetNodes.map(node => {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was normal server\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerElem */ \"a\"], {\n player: props.player,\n key: hserver.hostname,\n node: hserver,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeElem */ \"a\"], {\n player: props.player,\n key: node.name,\n node: node,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Hacknet \", Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) ? \"Servers\" : \"Nodes\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralInfo__WEBPACK_IMPORTED_MODULE_1__[/* GeneralInfo */ \"a\"], {\n hasHacknetServers: Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseButton__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseButton */ \"a\"], {\n cost: purchaseCost,\n multiplier: purchaseMultiplier,\n onClick: handlePurchaseButtonClick\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"hacknet-nodes-money-multipliers-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PlayerInfo__WEBPACK_IMPORTED_MODULE_7__[/* PlayerInfo */ \"a\"], {\n totalProduction: totalProduction,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__[/* MultiplierButtons */ \"a\"], {\n onClicks: purchaseMultiplierOnClicks,\n purchaseMultiplier: purchaseMultiplier\n })), Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: createHashUpgradesPopup,\n style: {\n display: \"block\"\n }\n }, \"Spend Hashes on Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", {\n id: \"hacknet-nodes-list\"\n }, nodes));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _GeneralInfo__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./GeneralInfo */ 960);\n/* harmony import */ var _HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HacknetNodeElem */ 961);\n/* harmony import */ var _HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./HacknetServerElem */ 962);\n/* harmony import */ var _HacknetNode__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../HacknetNode */ 248);\n/* harmony import */ var _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HashUpgradePopup */ 963);\n/* harmony import */ var _MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./MultiplierButtons */ 965);\n/* harmony import */ var _PlayerInfo__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./PlayerInfo */ 966);\n/* harmony import */ var _PurchaseButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseButton */ 967);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Server/AllServers */ 29);\n/* harmony import */ var _Server_Server__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Server/Server */ 92);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/**\n * Root React Component for the Hacknet Node UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction HacknetRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n const [purchaseMultiplier, setPurchaseMultiplier] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function createHashUpgradesPopup() {\n const id = \"hacknet-server-hash-upgrades-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(id, _HashUpgradePopup__WEBPACK_IMPORTED_MODULE_5__[/* HashUpgradePopup */ \"a\"], {\n player: props.player\n });\n }\n\n let totalProduction = 0;\n\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was a normal server\"); // should never happen\n\n if (hserver) {\n totalProduction += hserver.hashRate;\n } else {\n console.warn(`Could not find Hacknet Server object in AllServers map (i=${i})`);\n }\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick() {\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* purchaseHacknet */ \"l\"])(props.player);\n rerender();\n } // Cost to purchase a new Hacknet Node\n\n\n let purchaseCost;\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetServer */ \"b\"])(props.player);\n } else {\n purchaseCost = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* getCostOfNextHacknetNode */ \"a\"])(props.player);\n } // onClick event handlers for purchase multiplier buttons\n\n\n const purchaseMultiplierOnClicks = [() => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x1), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x5), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].x10), () => setPurchaseMultiplier(_data_Constants__WEBPACK_IMPORTED_MODULE_9__[/* PurchaseMultipliers */ \"c\"].MAX)]; // HacknetNode components\n\n const nodes = props.player.hacknetNodes.map(node => {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)) {\n if (node instanceof _HacknetNode__WEBPACK_IMPORTED_MODULE_4__[/* HacknetNode */ \"a\"]) throw new Error(\"node was hacknet node\"); // should never happen\n\n const hserver = _Server_AllServers__WEBPACK_IMPORTED_MODULE_11__[/* AllServers */ \"b\"][node];\n\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n\n if (hserver instanceof _Server_Server__WEBPACK_IMPORTED_MODULE_12__[/* Server */ \"a\"]) throw new Error(\"node was normal server\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetServerElem__WEBPACK_IMPORTED_MODULE_3__[/* HacknetServerElem */ \"a\"], {\n player: props.player,\n key: hserver.hostname,\n node: hserver,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetNodeElem__WEBPACK_IMPORTED_MODULE_2__[/* HacknetNodeElem */ \"a\"], {\n player: props.player,\n key: node.name,\n node: node,\n purchaseMultiplier: purchaseMultiplier,\n rerender: rerender\n });\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Hacknet \", Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) ? \"Servers\" : \"Nodes\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_GeneralInfo__WEBPACK_IMPORTED_MODULE_1__[/* GeneralInfo */ \"a\"], {\n hasHacknetServers: Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player)\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseButton__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseButton */ \"a\"], {\n cost: purchaseCost,\n multiplier: purchaseMultiplier,\n onClick: handlePurchaseButtonClick\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"hacknet-nodes-money-multipliers-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PlayerInfo__WEBPACK_IMPORTED_MODULE_7__[/* PlayerInfo */ \"a\"], {\n totalProduction: totalProduction,\n player: props.player\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MultiplierButtons__WEBPACK_IMPORTED_MODULE_6__[/* MultiplierButtons */ \"a\"], {\n onClicks: purchaseMultiplierOnClicks,\n purchaseMultiplier: purchaseMultiplier\n })), Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_10__[/* hasHacknetServers */ \"g\"])(props.player) && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: createHashUpgradesPopup,\n style: {\n display: \"block\"\n }\n }, \"Spend Hashes on Upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", {\n id: \"hacknet-nodes-list\"\n }, nodes));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetRoot.tsx?"); /***/ }), -/* 958 */ +/* 960 */ /*!****************************************!*\ !*** ./src/Hacknet/ui/GeneralInfo.tsx ***! \****************************************/ @@ -6162,7 +6164,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GeneralInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\n\nfunction GeneralInfo(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, \"The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\"), !props.hasHacknetServers ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Here, you can purchase a Hacknet Node, a specialized machine that can connect ` + `and contribute its resources to the Hacknet network. This allows you to take ` + `a small percentage of profits from hacks performed on the network. Essentially, ` + `you are renting out your Node's computing power.`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` + `can be upgraded in order to increase its computing power and thereby increase ` + `the profit you earn from it.`)) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` + `Hacknet Servers will perform computations and operations on the network, earning ` + `you hashes. Hashes can be spent on a variety of different upgrades.`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"hacknet-general-info\"\n }, `Hacknet Servers can also be used as servers to run scripts. However, running scripts ` + `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` + `rate will be reduced by the percentage of RAM that is being used by that Server to run ` + `scripts.`)));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/GeneralInfo.tsx?"); /***/ }), -/* 959 */ +/* 961 */ /*!********************************************!*\ !*** ./src/Hacknet/ui/HacknetNodeElem.tsx ***! \********************************************/ @@ -6171,10 +6173,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNodeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\nfunction HacknetNodeElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: node.totalMoneyGenerated,\n player: props.player\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: node.moneyGainRatePerSecond\n }), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.ram, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetNodeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\nfunction HacknetNodeElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.ram >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetNodeConstants */ \"a\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.name)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: node.totalMoneyGenerated,\n player: props.player\n }), \" (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_4__[/* MoneyRate */ \"a\"], {\n money: node.moneyGainRatePerSecond\n }), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.ram, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx?"); /***/ }), -/* 960 */ +/* 962 */ /*!**********************************************!*\ !*** ./src/Hacknet/ui/HacknetServerElem.tsx ***! \**********************************************/ @@ -6183,10 +6185,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServerElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\n\nfunction HacknetServerElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade RAM Button\n\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cores Button\n\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cache button\n\n\n let upgradeCacheContent, upgradeCacheClass;\n\n if (node.cache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CACHE\");\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCacheCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCacheCost)) {\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n upgradeCacheClass = \"std-button\";\n }\n }\n\n function upgradeCacheOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCacheUpgrade */ \"j\"])(props.player, node, numUpgrades);\n rerender();\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* updateHashManagerCapacity */ \"p\"])(props.player);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.hostname)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.totalHashesGenerated), \" (\", Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__[/* HashRate */ \"a\"])(node.hashRate), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hash Capacity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.hashCapacity))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.maxRam, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cache Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cache), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCacheClass,\n onClick: upgradeCacheOnClick\n }, upgradeCacheContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetServerElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetServerElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/HashRate */ 464);\n/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\n\n\n\n\n\n\nfunction HacknetServerElem(props) {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender; // Upgrade Level Button\n\n let upgradeLevelContent, upgradeLevelClass;\n\n if (node.level >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel) {\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX LEVEL\");\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeLevelCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeLevelCost)) {\n upgradeLevelClass = \"std-button-disabled\";\n } else {\n upgradeLevelClass = \"std-button\";\n }\n }\n\n function upgradeLevelOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberLevelUpgrades */ \"e\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxLevel);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseLevelUpgrade */ \"n\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade RAM Button\n\n\n let upgradeRamContent, upgradeRamClass;\n\n if (node.maxRam >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam) {\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX RAM\");\n upgradeRamClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(_data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeRamCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeRamCost)) {\n upgradeRamClass = \"std-button-disabled\";\n } else {\n upgradeRamClass = \"std-button\";\n }\n }\n\n function upgradeRamOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberRamUpgrades */ \"f\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxRam);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamUpgrade */ \"o\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cores Button\n\n\n let upgradeCoresContent, upgradeCoresClass;\n\n if (node.cores >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores) {\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CORES\");\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCoreCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCoreCost)) {\n upgradeCoresClass = \"std-button-disabled\";\n } else {\n upgradeCoresClass = \"std-button\";\n }\n }\n\n function upgradeCoresOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCoreUpgrades */ \"d\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCores);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCoreUpgrade */ \"k\"])(props.player, node, numUpgrades);\n rerender();\n } // Upgrade Cache button\n\n\n let upgradeCacheContent, upgradeCacheClass;\n\n if (node.cache >= _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache) {\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"MAX CACHE\");\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n let multiplier = 0;\n\n if (purchaseMult === \"MAX\") {\n multiplier = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n } else {\n const levelsToMax = _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult);\n }\n\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheContent = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade x\", multiplier, \" - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: upgradeCacheCost,\n player: props.player\n }));\n\n if (props.player.money.lt(upgradeCacheCost)) {\n upgradeCacheClass = \"std-button-disabled\";\n } else {\n upgradeCacheClass = \"std-button\";\n }\n }\n\n function upgradeCacheOnClick() {\n let numUpgrades = purchaseMult;\n\n if (purchaseMult === \"MAX\") {\n numUpgrades = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getMaxNumberCacheUpgrades */ \"c\"])(props.player, node, _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* HacknetServerConstants */ \"b\"].MaxCache);\n }\n\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* purchaseCacheUpgrade */ \"j\"])(props.player, node, numUpgrades);\n rerender();\n Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_2__[/* updateHashManagerCapacity */ \"p\"])(props.player);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n className: \"hacknet-node\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"hacknet-node-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", {\n style: {\n fontSize: \"1em\"\n }\n }, node.hostname)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Production:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text money-gold\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.totalHashesGenerated), \" (\", Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_5__[/* HashRate */ \"a\"])(node.hashRate), \")\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hash Capacity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text\"\n }, Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_4__[/* Hashes */ \"a\"])(node.hashCapacity))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.level), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeLevelClass,\n onClick: upgradeLevelOnClick\n }, upgradeLevelContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"RAM:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.maxRam, \"GB\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeRamClass,\n onClick: upgradeRamOnClick\n }, upgradeRamContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cores:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cores), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCoresClass,\n onClick: upgradeCoresOnClick\n }, upgradeCoresContent)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"row\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cache Level:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"text upgradable-info\"\n }, node.cache), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: upgradeCacheClass,\n onClick: upgradeCacheOnClick\n }, upgradeCacheContent))));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetServerElem.tsx?"); /***/ }), -/* 961 */ +/* 963 */ /*!*********************************************!*\ !*** ./src/Hacknet/ui/HashUpgradePopup.tsx ***! \*********************************************/ @@ -6195,10 +6197,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HashManager */ 287);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HashUpgrades */ 216);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetUpgradeElem */ 962);\n/**\n * Create the pop-up for purchasing upgrades with hashes\n */\n\n\n\n\n\nfunction HashUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n const hashManager = props.player.hashManager;\n\n if (!(hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_1__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n const upgradeElems = Object.keys(_HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"]).map(upgName => {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__[/* HacknetUpgradeElem */ \"a\"], {\n player: props.player,\n upg: upg,\n hashManager: hashManager,\n key: upg.name,\n rerender: rerender\n });\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spend your hashes on a variety of different upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__[/* Hashes */ \"a\"])(props.player.hashManager.hashes)), upgradeElems);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HashUpgradePopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HashUpgradePopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HashManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HashManager */ 288);\n/* harmony import */ var _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../HashUpgrades */ 217);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/* harmony import */ var _HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./HacknetUpgradeElem */ 964);\n/**\n * Create the pop-up for purchasing upgrades with hashes\n */\n\n\n\n\n\nfunction HashUpgradePopup(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 1000);\n return () => clearInterval(id);\n }, []);\n const hashManager = props.player.hashManager;\n\n if (!(hashManager instanceof _HashManager__WEBPACK_IMPORTED_MODULE_1__[/* HashManager */ \"a\"])) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n const upgradeElems = Object.keys(_HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"]).map(upgName => {\n const upg = _HashUpgrades__WEBPACK_IMPORTED_MODULE_2__[/* HashUpgrades */ \"a\"][upgName];\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_HacknetUpgradeElem__WEBPACK_IMPORTED_MODULE_4__[/* HacknetUpgradeElem */ \"a\"], {\n player: props.player,\n upg: upg,\n hashManager: hashManager,\n key: upg.name,\n rerender: rerender\n });\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Spend your hashes on a variety of different upgrades\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_3__[/* Hashes */ \"a\"])(props.player.hashManager.hashes)), upgradeElems);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HashUpgradePopup.tsx?"); /***/ }), -/* 962 */ +/* 964 */ /*!***********************************************!*\ !*** ./src/Hacknet/ui/HacknetUpgradeElem.tsx ***! \***********************************************/ @@ -6207,10 +6209,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetUpgradeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ServerDropdown */ 557);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 123);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\n\n\n\n\nfunction HacknetUpgradeElem(props) {\n const [selectedServer, setSelectedServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ecorp\");\n\n function changeTargetServer(event) {\n setSelectedServer(event.target.value);\n }\n\n function purchase() {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n\n if (canPurchase) {\n const res = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseHashUpgrade */ \"m\"])(props.player, props.upg.name, selectedServer);\n\n if (!res) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Failed to purchase upgrade. This may be because you do not have enough hashes, \" + \"or because you do not have access to the feature upgrade affects.\");\n }\n\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level); // Purchase button\n\n const canPurchase = hashManager.hashes >= cost;\n const btnClass = canPurchase ? \"std-button\" : \"std-button-disabled\"; // We'll reuse a Bladeburner css class\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: upg.name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cost: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(cost), \", Bought: \", level, \" times\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, upg.desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: btnClass,\n onClick: purchase\n }, \"Purchase\"), level > 0 && effect && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, effect), upg.hasTargetServer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerDropdown */ \"a\"], {\n serverType: _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerType */ \"b\"].Foreign,\n onChange: changeTargetServer,\n style: {\n margin: \"5px\"\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HacknetUpgradeElem; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ServerDropdown */ 557);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/CopyableText */ 124);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n\n\n\n\n\n\nfunction HacknetUpgradeElem(props) {\n const [selectedServer, setSelectedServer] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"ecorp\");\n\n function changeTargetServer(event) {\n setSelectedServer(event.target.value);\n }\n\n function purchase() {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n\n if (canPurchase) {\n const res = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseHashUpgrade */ \"m\"])(props.player, props.upg.name, selectedServer);\n\n if (!res) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Failed to purchase upgrade. This may be because you do not have enough hashes, \" + \"or because you do not have access to the feature upgrade affects.\");\n }\n\n props.rerender();\n }\n }\n\n const hashManager = props.hashManager;\n const upg = props.upg;\n const cost = hashManager.getUpgradeCost(upg.name);\n const level = hashManager.upgrades[upg.name];\n const effect = upg.effectText(level); // Purchase button\n\n const canPurchase = hashManager.hashes >= cost;\n const btnClass = canPurchase ? \"std-button\" : \"std-button-disabled\"; // We'll reuse a Bladeburner css class\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CopyableText__WEBPACK_IMPORTED_MODULE_4__[/* CopyableText */ \"b\"], {\n value: upg.name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Cost: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(cost), \", Bought: \", level, \" times\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, upg.desc), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: btnClass,\n onClick: purchase\n }, \"Purchase\"), level > 0 && effect && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, effect), upg.hasTargetServer && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerDropdown */ \"a\"], {\n serverType: _ui_React_ServerDropdown__WEBPACK_IMPORTED_MODULE_2__[/* ServerType */ \"b\"].Foreign,\n onChange: changeTargetServer,\n style: {\n margin: \"5px\"\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx?"); /***/ }), -/* 963 */ +/* 965 */ /*!**********************************************!*\ !*** ./src/Hacknet/ui/MultiplierButtons.tsx ***! \**********************************************/ @@ -6222,7 +6224,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MultiplierButtons; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/Constants */ 32);\n/**\n * React Component for the Multiplier buttons on the Hacknet page.\n * These buttons let the player control how many Nodes/Upgrades they're\n * purchasing when using the UI (x1, x5, x10, MAX)\n */\n\n\n\nfunction MultiplierButton(props) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: props.className,\n onClick: props.onClick\n }, props.text);\n}\n\nfunction MultiplierButtons(props) {\n if (props.purchaseMultiplier == null) {\n throw new Error(`MultiplierButtons constructed without required props`);\n }\n\n const mults = [\"x1\", \"x5\", \"x10\", \"MAX\"];\n const onClicks = props.onClicks;\n const buttons = [];\n\n for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n className: props.purchaseMultiplier === _data_Constants__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseMultipliers */ \"c\"][mult] ? \"std-button-disabled\" : \"std-button\",\n key: mult,\n onClick: onClicks[i],\n text: mult\n };\n buttons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierButton, btnProps));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n id: \"hacknet-nodes-multipliers\"\n }, buttons);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/MultiplierButtons.tsx?"); /***/ }), -/* 964 */ +/* 966 */ /*!***************************************!*\ !*** ./src/Hacknet/ui/PlayerInfo.tsx ***! \***************************************/ @@ -6231,10 +6233,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 122);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/HashRate */ 463);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\n\n\n\n\n\n\nfunction PlayerInfo(props) {\n const hasServers = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(props.player);\n let prod;\n\n if (hasServers) {\n prod = Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__[/* HashRate */ \"a\"])(props.totalProduction);\n } else {\n prod = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: props.totalProduction\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"hacknet-nodes-money\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasServers && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.hashes), \" / \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.capacity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Total Hacknet \", hasServers ? \"Server\" : \"Node\", \" Production: \"), prod);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PlayerInfo.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PlayerInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/MoneyRate */ 123);\n/* harmony import */ var _ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/HashRate */ 464);\n/* harmony import */ var _ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Hashes */ 185);\n/**\n * React Component for displaying Player info and stats on the Hacknet Node UI.\n * This includes:\n * - Player's money\n * - Player's production from Hacknet Nodes\n */\n\n\n\n\n\n\nfunction PlayerInfo(props) {\n const hasServers = Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(props.player);\n let prod;\n\n if (hasServers) {\n prod = Object(_ui_React_HashRate__WEBPACK_IMPORTED_MODULE_4__[/* HashRate */ \"a\"])(props.totalProduction);\n } else {\n prod = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_MoneyRate__WEBPACK_IMPORTED_MODULE_3__[/* MoneyRate */ \"a\"], {\n money: props.totalProduction\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"hacknet-nodes-money\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: props.player.money.toNumber()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), hasServers && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Hashes: \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.hashes), \" / \", Object(_ui_React_Hashes__WEBPACK_IMPORTED_MODULE_5__[/* Hashes */ \"a\"])(props.player.hashManager.capacity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Total Hacknet \", hasServers ? \"Server\" : \"Node\", \" Production: \"), prod);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PlayerInfo.tsx?"); /***/ }), -/* 965 */ +/* 967 */ /*!*******************************************!*\ !*** ./src/Hacknet/ui/PurchaseButton.tsx ***! \*******************************************/ @@ -6246,7 +6248,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../HacknetHelpers */ 46);\n/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Player */ 2);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\n\n\n\n\nfunction PurchaseButton(props) {\n const cost = props.cost;\n let className = _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"].canAfford(cost) ? \"std-button\" : \"std-button-disabled\";\n let text;\n let style = {};\n\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasHacknetServers */ \"g\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n if (Object(_HacknetHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasMaxNumberHacknetServers */ \"h\"])(_Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"])) {\n className = \"std-button-disabled\";\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Hacknet Server limit reached\");\n style = {\n color: \"red\"\n };\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n } else {\n text = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase Hacknet Node - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: _Player__WEBPACK_IMPORTED_MODULE_2__[/* Player */ \"a\"]\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: className,\n onClick: props.onClick,\n style: style\n }, text);\n}\n\n//# sourceURL=webpack:///./src/Hacknet/ui/PurchaseButton.tsx?"); /***/ }), -/* 966 */ +/* 968 */ /*!**********************************************!*\ !*** ./src/Locations/ui/CompanyLocation.tsx ***! \**********************************************/ @@ -6255,10 +6257,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApplyToJobButton */ 220);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Locations */ 223);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 275);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 967);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CompanyLocation(props) {\n const p = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_3__[/* Companies */ \"a\"][props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n /**\n * Reference to the Location that this component is being rendered for\n */\n\n const location = _Locations__WEBPACK_IMPORTED_MODULE_2__[/* Locations */ \"a\"][props.locName];\n\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n /**\n * Name of company position that player holds, if applicable\n */\n\n\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n\n const companyPosition = jobTitle ? _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][jobTitle] : null;\n p.location = props.locName;\n\n function applyForAgentJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const loc = location;\n if (!loc.infiltrationData) throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n router.toInfiltration(loc);\n }\n\n function work(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n\n if (pos instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__[/* CompanyPosition */ \"a\"]) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n\n router.toWork();\n }\n }\n\n function quit(e) {\n if (!e.isTrusted) return;\n const popupId = `quit-job-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__[/* createPopup */ \"a\"])(popupId, _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__[/* QuitJobPopup */ \"a\"], {\n locName: props.locName,\n company: company,\n player: p,\n onQuit: rerender,\n popupId: popupId\n });\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, isEmployedHere && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Job Title: \", jobTitle), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__[/* Reputation */ \"a\"])(company.playerReputation), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You will earn \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(favorGain[0]), \" company favor upon resetting after installing Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(company.favor), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: work,\n text: \"Work\"\n }), \"\\xA0\\xA0\\xA0\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: quit,\n text: \"Quit\"\n })), company.hasAgentPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* AgentCompanyPositions */ \"a\"][0]],\n onClick: applyForAgentJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Agent Job\"\n }), company.hasBusinessConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessConsultantCompanyPositions */ \"c\"][0]],\n onClick: applyForBusinessConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Consultant Job\"\n }), company.hasBusinessPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessCompanyPositions */ \"b\"][0]],\n onClick: applyForBusinessJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Job\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][1]],\n onClick: applyForEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be an Employee\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][1]],\n onClick: applyForPartTimeEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Employee\"\n }), company.hasITPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* ITCompanyPositions */ \"d\"][0]],\n onClick: applyForItJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for IT Job\"\n }), company.hasSecurityPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SecurityCompanyPositions */ \"h\"][2]],\n onClick: applyForSecurityJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Security Job\"\n }), company.hasSoftwareConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]],\n onClick: applyForSoftwareConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Consultant Job\"\n }), company.hasSoftwarePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareCompanyPositions */ \"j\"][0]],\n onClick: applyForSoftwareJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Job\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][0]],\n onClick: applyForWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a Waiter\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][0]],\n onClick: applyForPartTimeWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Waiter\"\n }), location.infiltrationData != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: startInfiltration,\n style: {\n display: \"block\"\n },\n text: \"Infiltrate Company\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CompanyLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CompanyLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApplyToJobButton */ 221);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Locations */ 194);\n/* harmony import */ var _Company_Companies__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Company/Companies */ 47);\n/* harmony import */ var _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Company/CompanyPosition */ 276);\n/* harmony import */ var _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Company/CompanyPositions */ 63);\n/* harmony import */ var _Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Company/data/companypositionnames */ 24);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/Favor */ 360);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Company/ui/QuitJobPopup */ 969);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a company\n *\n * This subcomponent renders all of the buttons for applying to jobs at a company\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction CompanyLocation(props) {\n const p = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n /**\n * We'll keep a reference to the Company that this component is being rendered for,\n * so we don't have to look it up every time\n */\n\n\n const company = _Company_Companies__WEBPACK_IMPORTED_MODULE_3__[/* Companies */ \"a\"][props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n /**\n * Reference to the Location that this component is being rendered for\n */\n\n const location = _Locations__WEBPACK_IMPORTED_MODULE_2__[/* Locations */ \"a\"][props.locName];\n\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n /**\n * Name of company position that player holds, if applicable\n */\n\n\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n\n const companyPosition = jobTitle ? _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][jobTitle] : null;\n p.location = props.locName;\n\n function applyForAgentJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e) {\n if (!e.isTrusted) {\n return;\n }\n\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const loc = location;\n if (!loc.infiltrationData) throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n router.toInfiltration(loc);\n }\n\n function work(e) {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n\n if (pos instanceof _Company_CompanyPosition__WEBPACK_IMPORTED_MODULE_4__[/* CompanyPosition */ \"a\"]) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n\n router.toWork();\n }\n }\n\n function quit(e) {\n if (!e.isTrusted) return;\n const popupId = `quit-job-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_10__[/* createPopup */ \"a\"])(popupId, _Company_ui_QuitJobPopup__WEBPACK_IMPORTED_MODULE_12__[/* QuitJobPopup */ \"a\"], {\n locName: props.locName,\n company: company,\n player: p,\n onQuit: rerender,\n popupId: popupId\n });\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, isEmployedHere && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Job Title: \", jobTitle), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_8__[/* Reputation */ \"a\"])(company.playerReputation), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"You will earn \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(favorGain[0]), \" company favor upon resetting after installing Augmentations\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"tooltip\"\n }, \"Company Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_9__[/* Favor */ \"a\"])(company.favor), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, \"Company favor increases the rate at which you earn reputation for this company by 1% per favor. Company favor is gained whenever you reset after installing Augmentations. The amount of favor you gain depends on how much reputation you have with the comapny.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"block\"\n }\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: work,\n text: \"Work\"\n }), \"\\xA0\\xA0\\xA0\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: quit,\n text: \"Quit\"\n })), company.hasAgentPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* AgentCompanyPositions */ \"a\"][0]],\n onClick: applyForAgentJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Agent Job\"\n }), company.hasBusinessConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessConsultantCompanyPositions */ \"c\"][0]],\n onClick: applyForBusinessConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Consultant Job\"\n }), company.hasBusinessPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* BusinessCompanyPositions */ \"b\"][0]],\n onClick: applyForBusinessJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Business Job\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][1]],\n onClick: applyForEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be an Employee\"\n }), company.hasEmployeePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][1]],\n onClick: applyForPartTimeEmployeeJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Employee\"\n }), company.hasITPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* ITCompanyPositions */ \"d\"][0]],\n onClick: applyForItJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for IT Job\"\n }), company.hasSecurityPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SecurityCompanyPositions */ \"h\"][2]],\n onClick: applyForSecurityJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Security Job\"\n }), company.hasSoftwareConsultantPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareConsultantCompanyPositions */ \"k\"][0]],\n onClick: applyForSoftwareConsultantJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Consultant Job\"\n }), company.hasSoftwarePositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* SoftwareCompanyPositions */ \"j\"][0]],\n onClick: applyForSoftwareJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply for Software Job\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* MiscCompanyPositions */ \"e\"][0]],\n onClick: applyForWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a Waiter\"\n }), company.hasWaiterPositions() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ApplyToJobButton__WEBPACK_IMPORTED_MODULE_1__[/* ApplyToJobButton */ \"a\"], {\n company: company,\n entryPosType: _Company_CompanyPositions__WEBPACK_IMPORTED_MODULE_5__[/* CompanyPositions */ \"a\"][_Company_data_companypositionnames__WEBPACK_IMPORTED_MODULE_6__[/* PartTimeCompanyPositions */ \"g\"][0]],\n onClick: applyForPartTimeWaiterJob,\n p: p,\n style: {\n display: \"block\"\n },\n text: \"Apply to be a part-time Waiter\"\n }), location.infiltrationData != null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_7__[/* StdButton */ \"a\"], {\n onClick: startInfiltration,\n style: {\n display: \"block\"\n },\n text: \"Infiltrate Company\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CompanyLocation.tsx?"); /***/ }), -/* 967 */ +/* 969 */ /*!*****************************************!*\ !*** ./src/Company/ui/QuitJobPopup.tsx ***! \*****************************************/ @@ -6270,7 +6272,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return QuitJobPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\nfunction QuitJobPopup(props) {\n function quit() {\n props.player.quitJob(props.locName);\n props.onQuit();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to quit your job at \", props.company.name, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: quit\n }, \"Quit\"));\n}\n\n//# sourceURL=webpack:///./src/Company/ui/QuitJobPopup.tsx?"); /***/ }), -/* 968 */ +/* 970 */ /*!******************************************!*\ !*** ./src/Locations/ui/GymLocation.tsx ***! \******************************************/ @@ -6282,7 +6284,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return GymLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nclass GymLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.trainStrength = this.trainStrength.bind(this);\n this.trainDefense = this.trainDefense.bind(this);\n this.trainDexterity = this.trainDexterity.bind(this);\n this.trainAgility = this.trainAgility.bind(this);\n this.calculateCost = this.calculateCost.bind(this);\n }\n\n calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(this.props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return this.props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return this.props.loc.costMult * discount;\n }\n\n train(stat) {\n const loc = this.props.loc;\n this.props.p.startClass(this.calculateCost(), loc.expMult, stat);\n }\n\n trainStrength() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymStrength);\n }\n\n trainDefense() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDefense);\n }\n\n trainDexterity() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymDexterity);\n }\n\n trainAgility() {\n this.train(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymAgility);\n }\n\n render() {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassGymBaseCost * this.calculateCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainStrength,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Strength (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDefense,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Defense (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainDexterity,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Dexterity (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: this.trainAgility,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Train Agility (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \" / sec)\")\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/GymLocation.tsx?"); /***/ }), -/* 969 */ +/* 971 */ /*!***********************************************!*\ !*** ./src/Locations/ui/HospitalLocation.tsx ***! \***********************************************/ @@ -6291,10 +6293,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HospitalLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Hospital/Hospital */ 308);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\n\n\n\n\n\nclass HospitalLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n this.state = {\n currHp: this.props.p.hp\n };\n }\n\n getCost() {\n return Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__[/* getHospitalizationCost */ \"b\"])(this.props.p);\n }\n\n getHealed(e) {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost);\n this.props.p.hp = this.props.p.max_hp;\n this.props.p.recordMoneySource(-1 * cost, \"hospitalization\"); // This just forces a re-render to update the cost\n\n this.setState({\n currHp: this.props.p.hp\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You were healed to full health! The hospital billed you for \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n render() {\n const cost = this.getCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__[/* AutoupdatingStdButton */ \"a\"], {\n onClick: this.getHealed,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Get treatment for wounds - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/HospitalLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return HospitalLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Hospital/Hospital */ 310);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a hospital\n *\n * This subcomponent renders all of the buttons for hospital options\n */\n\n\n\n\n\nclass HospitalLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Stores button styling that sets them all to block display\n */\n constructor(props) {\n super(props);\n this.btnStyle = {\n display: \"block\"\n };\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n this.state = {\n currHp: this.props.p.hp\n };\n }\n\n getCost() {\n return Object(_Hospital_Hospital__WEBPACK_IMPORTED_MODULE_1__[/* getHospitalizationCost */ \"b\"])(this.props.p);\n }\n\n getHealed(e) {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\n }\n\n if (this.props.p.hp >= this.props.p.max_hp) {\n return;\n }\n\n const cost = this.getCost();\n this.props.p.loseMoney(cost);\n this.props.p.hp = this.props.p.max_hp;\n this.props.p.recordMoneySource(-1 * cost, \"hospitalization\"); // This just forces a re-render to update the cost\n\n this.setState({\n currHp: this.props.p.hp\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You were healed to full health! The hospital billed you for \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost\n })));\n }\n\n render() {\n const cost = this.getCost();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_2__[/* AutoupdatingStdButton */ \"a\"], {\n onClick: this.getHealed,\n style: this.btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Get treatment for wounds - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/HospitalLocation.tsx?"); /***/ }), -/* 970 */ +/* 972 */ /*!********************************************!*\ !*** ./src/Locations/ui/SlumsLocation.tsx ***! \********************************************/ @@ -6306,7 +6308,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlumsLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Crime/Crimes */ 60);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a slum\n *\n * This subcomponent renders all of the buttons for committing crimes\n */\n\n\n\n\n\nfunction SlumsLocation() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n\n function shoplift(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.commit(player);\n router.toWork();\n }\n\n function robStore(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.commit(player);\n router.toWork();\n }\n\n function mug(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.commit(player);\n router.toWork();\n }\n\n function larceny(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.commit(player);\n router.toWork();\n }\n\n function dealDrugs(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.commit(player);\n router.toWork();\n }\n\n function bondForgery(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.commit(player);\n router.toWork();\n }\n\n function traffickArms(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.commit(player);\n router.toWork();\n }\n\n function homicide(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.commit(player);\n router.toWork();\n }\n\n function grandTheftAuto(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.commit(player);\n router.toWork();\n }\n\n function kidnap(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.commit(player);\n router.toWork();\n }\n\n function assassinate(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.commit(player);\n router.toWork();\n }\n\n function heist(e) {\n if (!e.isTrusted) {\n return;\n }\n\n _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.commit(player);\n router.toWork();\n }\n\n const shopliftChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Shoplift.successRate(player);\n const robStoreChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].RobStore.successRate(player);\n const mugChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Mug.successRate(player);\n const larcenyChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Larceny.successRate(player);\n const drugsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].DealDrugs.successRate(player);\n const bondChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].BondForgery.successRate(player);\n const armsChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].TraffickArms.successRate(player);\n const homicideChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Homicide.successRate(player);\n const gtaChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].GrandTheftAuto.successRate(player);\n const kidnapChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Kidnap.successRate(player);\n const assassinateChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Assassination.successRate(player);\n const heistChance = _Crime_Crimes__WEBPACK_IMPORTED_MODULE_1__[/* Crimes */ \"a\"].Heist.successRate(player);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: shoplift,\n style: {\n display: \"block\"\n },\n text: `Shoplift (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(shopliftChance)} chance of success)`,\n tooltip: \"Attempt to shoplift from a low-end retailer\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: robStore,\n style: {\n display: \"block\"\n },\n text: `Rob store (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(robStoreChance)} chance of success)`,\n tooltip: \"Attempt to commit armed robbery on a high-end store\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: mug,\n style: {\n display: \"block\"\n },\n text: `Mug someone (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(mugChance)} chance of success)`,\n tooltip: \"Attempt to mug a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: larceny,\n style: {\n display: \"block\"\n },\n text: `Larceny (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(larcenyChance)} chance of success)`,\n tooltip: \"Attempt to rob property from someone's house\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: dealDrugs,\n style: {\n display: \"block\"\n },\n text: `Deal Drugs (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(drugsChance)} chance of success)`,\n tooltip: \"Attempt to deal drugs\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: bondForgery,\n style: {\n display: \"block\"\n },\n text: `Bond Forgery (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(bondChance)} chance of success)`,\n tooltip: \"Attempt to forge corporate bonds\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: traffickArms,\n style: {\n display: \"block\"\n },\n text: `Traffick illegal Arms (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(armsChance)} chance of success)`,\n tooltip: \"Attempt to smuggle illegal arms into the city\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: homicide,\n style: {\n display: \"block\"\n },\n text: `Homicide (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(homicideChance)} chance of success)`,\n tooltip: \"Attempt to murder a random person on the street\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: grandTheftAuto,\n style: {\n display: \"block\"\n },\n text: `Grand theft Auto (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(gtaChance)} chance of success)`,\n tooltip: \"Attempt to commit grand theft auto\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: kidnap,\n style: {\n display: \"block\"\n },\n text: `Kidnap and Ransom (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(kidnapChance)} chance of success)`,\n tooltip: \"Attempt to kidnap and ransom a high-profile-target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: assassinate,\n style: {\n display: \"block\"\n },\n text: `Assassinate (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(assassinateChance)} chance of success)`,\n tooltip: \"Attempt to assassinate a high-profile target\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_3__[/* AutoupdatingStdButton */ \"a\"], {\n intervalTime: 5e3,\n onClick: heist,\n style: {\n display: \"block\"\n },\n text: `Heist (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatPercentage(heistChance)} chance of success)`,\n tooltip: \"Attempt to pull off the ultimate heist\"\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SlumsLocation.tsx?"); /***/ }), -/* 971 */ +/* 973 */ /*!**********************************************!*\ !*** ./src/Locations/ui/SpecialLocation.tsx ***! \**********************************************/ @@ -6315,10 +6317,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Corporation/ui/CreateCorporationPopup */ 972);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\n\n\n\n\n\n\n\n\nfunction SpecialLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [rerender, setRerender] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const inBladeburner = player.inBladeburner();\n /**\n * Click handler for \"Create Corporation\" button at Sector-12 City Hall\n */\n\n function createCorporationPopup() {\n const popupId = `create-start-corporation-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__[/* CreateCorporationPopup */ \"a\"], {\n player: player,\n popupId: popupId\n });\n }\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n\n\n function handleBladeburner() {\n const p = player;\n\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({\n new: true\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You have been accepted into the Bladeburner division!\");\n setRerender(old => !old);\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n\n\n function handleResleeving() {\n router.toResleeves();\n }\n\n function renderBladeburner() {\n if (!player.canAccessBladeburner()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleBladeburner,\n style: {\n display: \"block\"\n },\n text: text\n });\n }\n\n function renderNoodleBar() {\n function EatNoodles() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You ate some delicious noodles and feel refreshed.\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: EatNoodles,\n style: {\n display: \"block\"\n },\n text: \"Eat noodles\"\n });\n }\n\n function renderCreateCorporation() {\n if (!player.canAccessCorporation()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"A business man is yelling at a clerk. You should come back later.\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__[/* AutoupdatingStdButton */ \"a\"], {\n disabled: !player.canAccessCorporation() || player.hasCorporation(),\n onClick: createCorporationPopup,\n style: {\n display: \"block\"\n },\n text: \"Create a Corporation\"\n });\n }\n\n function renderResleeving() {\n if (!player.canAccessResleeving()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleResleeving,\n style: {\n display: \"block\"\n },\n text: \"Re-Sleeve\"\n });\n }\n\n switch (props.loc.name) {\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoVitaLife:\n {\n return renderResleeving();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12CityHall:\n {\n return renderCreateCorporation();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12NSA:\n {\n return renderBladeburner();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoNoodleBar:\n {\n return renderNoodleBar();\n }\n\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SpecialLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SpecialLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Corporation/ui/CreateCorporationPopup */ 974);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/AutoupdatingStdButton */ 142);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Subcomponent for displaying a location's UI, when that location has special\n * actions/options/properties\n *\n * Examples:\n * - Bladeburner @ NSA\n * - Re-sleeving @ VitaLife\n * - Create Corporation @ City Hall\n *\n * This subcomponent creates all of the buttons for interacting with those special\n * properties\n */\n\n\n\n\n\n\n\n\nfunction SpecialLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_4__[/* use */ \"b\"].Router();\n const [rerender, setRerender] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const inBladeburner = player.inBladeburner();\n /**\n * Click handler for \"Create Corporation\" button at Sector-12 City Hall\n */\n\n function createCorporationPopup() {\n const popupId = `create-start-corporation-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* createPopup */ \"a\"])(popupId, _Corporation_ui_CreateCorporationPopup__WEBPACK_IMPORTED_MODULE_1__[/* CreateCorporationPopup */ \"a\"], {\n player: player,\n popupId: popupId\n });\n }\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n\n\n function handleBladeburner() {\n const p = player;\n\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else {\n // Apply for Bladeburner division\n if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n p.startBladeburner({\n new: true\n });\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You have been accepted into the Bladeburner division!\");\n setRerender(old => !old);\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)\");\n }\n }\n }\n /**\n * Click handler for Resleeving button at New Tokyo VitaLife\n */\n\n\n function handleResleeving() {\n router.toResleeves();\n }\n\n function renderBladeburner() {\n if (!player.canAccessBladeburner()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleBladeburner,\n style: {\n display: \"block\"\n },\n text: text\n });\n }\n\n function renderNoodleBar() {\n function EatNoodles() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You ate some delicious noodles and feel refreshed.\"));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: EatNoodles,\n style: {\n display: \"block\"\n },\n text: \"Eat noodles\"\n });\n }\n\n function renderCreateCorporation() {\n if (!player.canAccessCorporation()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"A business man is yelling at a clerk. You should come back later.\")));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_AutoupdatingStdButton__WEBPACK_IMPORTED_MODULE_5__[/* AutoupdatingStdButton */ \"a\"], {\n disabled: !player.canAccessCorporation() || player.hasCorporation(),\n onClick: createCorporationPopup,\n style: {\n display: \"block\"\n },\n text: \"Create a Corporation\"\n });\n }\n\n function renderResleeving() {\n if (!player.canAccessResleeving()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: handleResleeving,\n style: {\n display: \"block\"\n },\n text: \"Re-Sleeve\"\n });\n }\n\n switch (props.loc.name) {\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoVitaLife:\n {\n return renderResleeving();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12CityHall:\n {\n return renderCreateCorporation();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].Sector12NSA:\n {\n return renderBladeburner();\n }\n\n case _data_LocationNames__WEBPACK_IMPORTED_MODULE_3__[/* LocationName */ \"a\"].NewTokyoNoodleBar:\n {\n return renderNoodleBar();\n }\n\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/SpecialLocation.tsx?"); /***/ }), -/* 972 */ +/* 974 */ /*!*******************************************************!*\ !*** ./src/Corporation/ui/CreateCorporationPopup.tsx ***! \*******************************************************/ @@ -6330,7 +6332,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateCorporationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction CreateCorporationPopup(props) {\n if (!props.player.canAccessCorporation() || props.player.hasCorporation()) {\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n const [name, setName] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function onChange(event) {\n setName(event.target.value);\n }\n\n function selfFund() {\n if (!props.player.canAfford(150e9)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"You don't have enough money to create a corporation! You need $150b.\");\n return;\n }\n\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name);\n props.player.loseMoney(150e9);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just self-funded your own corporation. You can visit \" + \"and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function seed() {\n if (name == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Invalid company name!\");\n return;\n }\n\n props.player.startCorporation(name, 500e6);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Congratulations! You just started your own corporation with government seed money. \" + \"You can visit and manage your company in the City.\");\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to start a corporation? This will require $150b for registration and initial funding. This $150b can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million shares\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"If you would like to start one, please enter a name for your corporation below:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n className: \"text-input\",\n placeholder: \"Corporation Name\",\n onChange: onChange,\n value: name\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: seed,\n disabled: name == \"\"\n }, \"Use seed money\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: selfFund,\n disabled: name == \"\" || !props.player.canAfford(150e9)\n }, \"Self-Fund (\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: 150e9,\n player: props.player\n }), \")\"));\n}\n\n//# sourceURL=webpack:///./src/Corporation/ui/CreateCorporationPopup.tsx?"); /***/ }), -/* 973 */ +/* 975 */ /*!*************************************************!*\ !*** ./src/Locations/ui/TechVendorLocation.tsx ***! \*************************************************/ @@ -6339,10 +6341,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TechVendorLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RamButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamButton */ 974);\n/* harmony import */ var _TorButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TorButton */ 975);\n/* harmony import */ var _CoresButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CoresButton */ 977);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseServerPopup */ 978);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\n\n\n\n\n\n\n\n\n\nfunction TechVendorLocation(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function openPurchaseServer(ram, cost, p) {\n const popupId = \"purchase-server-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseServerPopup */ \"a\"], {\n ram: ram,\n cost: cost,\n p: p,\n popupId: popupId,\n rerender: rerender\n });\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n const btnStyle = {\n display: \"block\"\n };\n const purchaseServerButtons = [];\n\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__[/* getPurchaseServerCost */ \"a\"])(i);\n purchaseServerButtons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: i,\n onClick: () => openPurchaseServer(i, cost, props.p),\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", i, \"GB Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n disabled: !props.p.canAfford(cost)\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, purchaseServerButtons, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"\\\"You can order bigger servers via scripts. We don't take custom order in person.\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TorButton__WEBPACK_IMPORTED_MODULE_2__[/* TorButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RamButton__WEBPACK_IMPORTED_MODULE_1__[/* RamButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CoresButton__WEBPACK_IMPORTED_MODULE_3__[/* CoresButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TechVendorLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TechVendorLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _RamButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RamButton */ 976);\n/* harmony import */ var _TorButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TorButton */ 977);\n/* harmony import */ var _CoresButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CoresButton */ 979);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./PurchaseServerPopup */ 980);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a tech vendor\n *\n * This subcomponent renders all of the buttons for purchasing things from tech vendors\n */\n\n\n\n\n\n\n\n\n\nfunction TechVendorLocation(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function openPurchaseServer(ram, cost, p) {\n const popupId = \"purchase-server-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_7__[/* createPopup */ \"a\"])(popupId, _PurchaseServerPopup__WEBPACK_IMPORTED_MODULE_8__[/* PurchaseServerPopup */ \"a\"], {\n ram: ram,\n cost: cost,\n p: p,\n popupId: popupId,\n rerender: rerender\n });\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n const btnStyle = {\n display: \"block\"\n };\n const purchaseServerButtons = [];\n\n for (let i = props.loc.techVendorMinRam; i <= props.loc.techVendorMaxRam; i *= 2) {\n const cost = Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_4__[/* getPurchaseServerCost */ \"a\"])(i);\n purchaseServerButtons.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n key: i,\n onClick: () => openPurchaseServer(i, cost, props.p),\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase \", i, \"GB Server - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n disabled: !props.p.canAfford(cost)\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, purchaseServerButtons, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"i\", null, \"\\\"You can order bigger servers via scripts. We don't take custom order in person.\\\"\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TorButton__WEBPACK_IMPORTED_MODULE_2__[/* TorButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_RamButton__WEBPACK_IMPORTED_MODULE_1__[/* RamButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CoresButton__WEBPACK_IMPORTED_MODULE_3__[/* CoresButton */ \"a\"], {\n p: props.p,\n rerender: rerender\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TechVendorLocation.tsx?"); /***/ }), -/* 974 */ +/* 976 */ /*!****************************************!*\ !*** ./src/Locations/ui/RamButton.tsx ***! \****************************************/ @@ -6351,10 +6353,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\n\n\nfunction RamButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' RAM - MAX\"\n });\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamForHomeComputer */ \"d\"])(props.p);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' RAM (\", homeComputer.maxRam, \"GB -> \", homeComputer.maxRam * 2, \"GB) -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_6__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 3.2 \\times 10^3 \\times 1.58^{log_2{(ram)}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/RamButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return RamButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\n\n\n\n\n\nfunction RamButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n\n if (homeComputer.maxRam >= _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].HomeComputerMaxRam) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' RAM - MAX\"\n });\n }\n\n const cost = props.p.getUpgradeHomeRamCost();\n\n function buy() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseRamForHomeComputer */ \"d\"])(props.p);\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' RAM (\", homeComputer.maxRam, \"GB -> \", homeComputer.maxRam * 2, \"GB) -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_6__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 3.2 \\times 10^3 \\times 1.58^{log_2{(ram)}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/RamButton.tsx?"); /***/ }), -/* 975 */ +/* 977 */ /*!****************************************!*\ !*** ./src/Locations/ui/TorButton.tsx ***! \****************************************/ @@ -6363,10 +6365,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TorButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../LocationsHelpers */ 976);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\nfunction TorButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n\n function buy() {\n Object(_LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseTorRouter */ \"a\"])(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"TOR Router - Purchased\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase TOR router - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost,\n player: props.p\n }))\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TorButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TorButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../LocationsHelpers */ 978);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n\n\n\n\n\n\nfunction TorButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n\n function buy() {\n Object(_LocationsHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseTorRouter */ \"a\"])(props.p);\n props.rerender();\n }\n\n if (props.p.hasTorRouter()) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_3__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"TOR Router - Purchased\"\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Purchase TOR router - \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TorRouterCost,\n player: props.p\n }))\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TorButton.tsx?"); /***/ }), -/* 976 */ +/* 978 */ /*!********************************************!*\ !*** ./src/Locations/LocationsHelpers.tsx ***! \********************************************/ @@ -6378,7 +6380,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return purchaseTorRouter; });\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Constants */ 5);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Server/SpecialServerIps */ 51);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/**\n * Location and traveling-related helper functions.\n * Mostly used for UI\n */\n\n\n\n\n\n/**\n * Attempt to purchase a TOR router\n * @param {IPlayer} p - Player object\n */\n\nfunction purchaseTorRouter(p) {\n if (p.hasTorRouter()) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(`You already have a TOR Router!`);\n return;\n }\n\n if (!p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You cannot afford to purchase the TOR router!\");\n return;\n }\n\n p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_0__[/* CONSTANTS */ \"a\"].TorRouterCost);\n const darkweb = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* safetlyCreateUniqueServer */ \"h\"])({\n ip: Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* createUniqueRandomIp */ \"c\"])(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1\n });\n Object(_Server_AllServers__WEBPACK_IMPORTED_MODULE_1__[/* AddToAllServers */ \"a\"])(darkweb);\n _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].addIp(\"Darkweb Server\", darkweb.ip);\n p.getHomeComputer().serversOnNetwork.push(darkweb.ip);\n darkweb.serversOnNetwork.push(p.getHomeComputer().ip);\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_4__[/* dialogBoxCreate */ \"a\"])(\"You have purchased a TOR router!
\" + \"You now have access to the dark web from your home computer.
\" + \"Use the scan/scan-analyze commands to search for the dark web connection.\");\n}\n\n//# sourceURL=webpack:///./src/Locations/LocationsHelpers.tsx?"); /***/ }), -/* 977 */ +/* 979 */ /*!******************************************!*\ !*** ./src/Locations/ui/CoresButton.tsx ***! \******************************************/ @@ -6387,10 +6389,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoresButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mathjax-react */ 195);\n\n\n\n\n\nfunction CoresButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n\n if (maxCores) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' cores - MAX\"\n });\n }\n\n const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy() {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' cores (\", homeComputer.cpuCores, \" -> \", homeComputer.cpuCores + 1, \") -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_4__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 10^9 \\times 7.5 ^{\\text{cores}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CoresButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoresButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! mathjax-react */ 196);\n\n\n\n\n\nfunction CoresButton(props) {\n const btnStyle = {\n display: \"block\"\n };\n const homeComputer = props.p.getHomeComputer();\n const maxCores = homeComputer.cpuCores >= 8;\n\n if (maxCores) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_1__[/* StdButtonPurchased */ \"a\"], {\n style: btnStyle,\n text: \"Upgrade 'home' cores - MAX\"\n });\n }\n\n const cost = 1e9 * Math.pow(7.5, homeComputer.cpuCores);\n\n function buy() {\n if (maxCores) return;\n if (!props.p.canAfford(cost)) return;\n props.p.loseMoney(cost);\n homeComputer.cpuCores++;\n props.rerender();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: !props.p.canAfford(cost),\n onClick: buy,\n style: btnStyle,\n text: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Upgrade 'home' cores (\", homeComputer.cpuCores, \" -> \", homeComputer.cpuCores + 1, \") -\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: props.p\n })),\n tooltip: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_4__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{cost = 10^9 \\times 7.5 ^{\\text{cores}}}`\n })\n });\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CoresButton.tsx?"); /***/ }), -/* 978 */ +/* 980 */ /*!**************************************************!*\ !*** ./src/Locations/ui/PurchaseServerPopup.tsx ***! \**************************************************/ @@ -6402,7 +6404,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseServerPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerPurchases */ 173);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Component for the popup used to purchase a new server.\n */\n\n\n\n\n\n\nfunction PurchaseServerPopup(props) {\n const [hostname, setHostname] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n\n function tryToPurchaseServer() {\n Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_2__[/* purchaseServer */ \"e\"])(hostname, props.ram, props.cost, props.p);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) tryToPurchaseServer();\n }\n\n function onChange(event) {\n setHostname(event.target.value);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to purchase a new server with \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatRAM(props.ram), \" of RAM for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_4__[/* Money */ \"a\"], {\n money: props.cost,\n player: props.p\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Please enter the server hostname below:\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n autoFocus: true,\n onKeyUp: onKeyUp,\n onChange: onChange,\n className: \"text-input noselect\",\n type: \"text\",\n placeholder: \"Unique Hostname\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: tryToPurchaseServer,\n text: \"Purchase Server\",\n disabled: !props.p.canAfford(props.cost)\n })));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/PurchaseServerPopup.tsx?"); /***/ }), -/* 979 */ +/* 981 */ /*!******************************************************!*\ !*** ./src/Locations/ui/TravelConfirmationPopup.tsx ***! \******************************************************/ @@ -6414,7 +6416,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TravelConfirmationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\nfunction TravelConfirmationPopup(props) {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].TravelCost;\n\n function travel() {\n props.travel();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Would you like to travel to \", props.city, \"? The trip will cost \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: cost,\n player: props.player\n }), \".\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: travel\n }, \"Travel\"));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/TravelConfirmationPopup.tsx?"); /***/ }), -/* 980 */ +/* 982 */ /*!*************************************************!*\ !*** ./src/Locations/ui/UniversityLocation.tsx ***! \*************************************************/ @@ -6426,7 +6428,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return UniversityLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Server/SpecialServerIps */ 51);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a university\n *\n * This subcomponent renders all of the buttons for studying/taking courses\n */\n\n\n\n\n\n\n\nfunction UniversityLocation(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n\n function calculateCost() {\n const ip = _Server_SpecialServerIps__WEBPACK_IMPORTED_MODULE_3__[/* SpecialServerIps */ \"a\"].getIp(props.loc.name);\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getServer */ \"b\"])(ip);\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = server.backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function take(stat) {\n const loc = props.loc;\n player.startClass(calculateCost(), loc.expMult, stat);\n router.toWork();\n }\n\n function study() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassStudyComputerScience);\n }\n\n function dataStructures() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructures);\n }\n\n function networks() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworks);\n }\n\n function algorithms() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithms);\n }\n\n function management() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagement);\n }\n\n function leadership() {\n take(_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadership);\n }\n\n const costMult = calculateCost();\n const dataStructuresCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassDataStructuresBaseCost * costMult;\n const networksCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassNetworksBaseCost * costMult;\n const algorithmsCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassAlgorithmsBaseCost * costMult;\n const managementCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassManagementBaseCost * costMult;\n const leadershipCost = _Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].ClassLeadershipBaseCost * costMult;\n const earnHackingExpTooltip = `Gain hacking experience!`;\n const earnCharismaExpTooltip = `Gain charisma experience!`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: study,\n style: {\n display: \"block\"\n },\n text: `Study Computer Science (free)`,\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: dataStructures,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Data Structures course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: dataStructuresCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: networks,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Networks course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: networksCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: algorithms,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Algorithms course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: algorithmsCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnHackingExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: management,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Management course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: managementCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_4__[/* StdButton */ \"a\"], {\n onClick: leadership,\n style: {\n display: \"block\"\n },\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Take Leadership course (\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: leadershipCost,\n player: player\n }), \" / sec)\"),\n tooltip: earnCharismaExpTooltip\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/UniversityLocation.tsx?"); /***/ }), -/* 981 */ +/* 983 */ /*!*********************************************!*\ !*** ./src/Locations/ui/CasinoLocation.tsx ***! \*********************************************/ @@ -6435,10 +6437,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CasinoLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Casino/Blackjack */ 982);\n/* harmony import */ var _Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Casino/CoinFlip */ 986);\n/* harmony import */ var _Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Casino/Roulette */ 987);\n/* harmony import */ var _Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Casino/SlotMachine */ 988);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nvar GameType;\n\n(function (GameType) {\n GameType[\"None\"] = \"none\";\n GameType[\"Coin\"] = \"coin\";\n GameType[\"Slots\"] = \"slots\";\n GameType[\"Roulette\"] = \"roulette\";\n GameType[\"Blackjack\"] = \"blackjack\";\n})(GameType || (GameType = {}));\n\nclass CasinoLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n game: GameType.None\n };\n this.updateGame = this.updateGame.bind(this);\n }\n\n updateGame(game) {\n this.setState({\n game\n });\n }\n\n renderGames() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Coin),\n text: \"Play coin flip\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Slots),\n text: \"Play slots\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Roulette),\n text: \"Play roulette\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Blackjack),\n text: \"Play blackjack\"\n }));\n }\n\n renderGame() {\n let elem = null;\n\n switch (this.state.game) {\n case GameType.Coin:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__[/* CoinFlip */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Slots:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__[/* SlotMachine */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Roulette:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__[/* Roulette */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Blackjack:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__[/* Blackjack */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.None:\n break;\n\n default:\n throw new Error(`MissingCaseException: ${this.state.game}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.None),\n text: \"Stop playing\"\n }), elem);\n }\n\n render() {\n if (this.state.game === GameType.None) {\n return this.renderGames();\n } else {\n return this.renderGame();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CasinoLocation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CasinoLocation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Casino/Blackjack */ 984);\n/* harmony import */ var _Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Casino/CoinFlip */ 988);\n/* harmony import */ var _Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Casino/Roulette */ 989);\n/* harmony import */ var _Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Casino/SlotMachine */ 990);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\n\nvar GameType;\n\n(function (GameType) {\n GameType[\"None\"] = \"none\";\n GameType[\"Coin\"] = \"coin\";\n GameType[\"Slots\"] = \"slots\";\n GameType[\"Roulette\"] = \"roulette\";\n GameType[\"Blackjack\"] = \"blackjack\";\n})(GameType || (GameType = {}));\n\nclass CasinoLocation extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n game: GameType.None\n };\n this.updateGame = this.updateGame.bind(this);\n }\n\n updateGame(game) {\n this.setState({\n game\n });\n }\n\n renderGames() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Coin),\n text: \"Play coin flip\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Slots),\n text: \"Play slots\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Roulette),\n text: \"Play roulette\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.Blackjack),\n text: \"Play blackjack\"\n }));\n }\n\n renderGame() {\n let elem = null;\n\n switch (this.state.game) {\n case GameType.Coin:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_CoinFlip__WEBPACK_IMPORTED_MODULE_2__[/* CoinFlip */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Slots:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_SlotMachine__WEBPACK_IMPORTED_MODULE_4__[/* SlotMachine */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Roulette:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Roulette__WEBPACK_IMPORTED_MODULE_3__[/* Roulette */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.Blackjack:\n elem = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_Casino_Blackjack__WEBPACK_IMPORTED_MODULE_1__[/* Blackjack */ \"a\"], {\n p: this.props.p\n });\n break;\n\n case GameType.None:\n break;\n\n default:\n throw new Error(`MissingCaseException: ${this.state.game}`);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => this.updateGame(GameType.None),\n text: \"Stop playing\"\n }), elem);\n }\n\n render() {\n if (this.state.game === GameType.None) {\n return this.renderGames();\n } else {\n return this.renderGame();\n }\n }\n\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/CasinoLocation.tsx?"); /***/ }), -/* 982 */ +/* 984 */ /*!**********************************!*\ !*** ./src/Casino/Blackjack.tsx ***! \**********************************/ @@ -6447,10 +6449,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Blackjack; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CardDeck/Deck */ 983);\n/* harmony import */ var _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CardDeck/Hand */ 412);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 1386);\n/* harmony import */ var _CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CardDeck/ReactCard */ 559);\n/* harmony import */ var _ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/React/MuiTextField */ 985);\n/* harmony import */ var _ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/React/MuiButton */ 487);\n/* harmony import */ var _ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/React/MuiPaper */ 560);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_BET = 100e6;\nvar Result;\n\n(function (Result) {\n Result[\"Pending\"] = \"\";\n Result[\"PlayerWon\"] = \"You won!\";\n Result[\"PlayerWonByBlackjack\"] = \"You Won! Blackjack!\";\n Result[\"DealerWon\"] = \"You lost!\";\n Result[\"Tie\"] = \"Push! (Tie)\";\n})(Result || (Result = {}));\n\nclass Blackjack extends _Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"canStartGame\", () => {\n const {\n p\n } = this.props;\n const {\n bet\n } = this.state;\n return p.canAfford(bet);\n });\n\n _defineProperty(this, \"startGame\", () => {\n if (!this.canStartGame()) {\n return;\n } // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e)\n\n\n this.props.p.loseMoney(this.state.bet);\n const playerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending\n }); // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"getHandValue\", hand => {\n let result = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n\n if (value >= 10) {\n result = result.map(x => x + 10);\n } else if (value === 1) {\n result = result.flatMap(x => [x + 1, x + 11]);\n } else {\n result = result.map(x => x + value);\n }\n }\n\n return result;\n });\n\n _defineProperty(this, \"getTrueHandValue\", hand => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter(x => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n });\n\n _defineProperty(this, \"getHandDisplayValues\", hand => {\n const handValues = this.getHandValue(hand);\n\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter(x => x <= 21))];\n }\n });\n\n _defineProperty(this, \"isHandBusted\", hand => {\n return this.getTrueHandValue(hand) > 21;\n });\n\n _defineProperty(this, \"playerHit\", event => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n this.setState({\n playerHand: newHand\n }); // Check if player busted, and finish the game if so\n\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"playerStay\", event => {\n if (!event.isTrusted) {\n return;\n } // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n\n\n let newDealerHand = this.state.dealerHand;\n\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand\n }); // If dealer has busted, then player wins\n\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand); // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n });\n\n _defineProperty(this, \"finishGame\", result => {\n let gains = 0;\n\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet; // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains\n });\n });\n\n _defineProperty(this, \"isPlayerWinResult\", result => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\n });\n\n _defineProperty(this, \"wagerOnChange\", event => {\n const {\n p\n } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\"\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\"\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\"\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\"\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending // Reset previous game status to clear the win/lose text UI\n\n });\n }\n });\n\n _defineProperty(this, \"startOnClick\", event => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n });\n\n this.deck = new _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__[/* Deck */ \"a\"](5); // 5-deck multideck\n\n const initialBet = 1e6;\n this.state = {\n playerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n dealerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\"\n };\n }\n\n render() {\n const {\n betInput,\n playerHand,\n dealerHand,\n gameInProgress,\n result,\n wagerInvalid,\n wagerInvalidHelperText,\n gains\n } = this.state; // Get the player totals to display.\n\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__[/* MuiTextField */ \"a\"], {\n value: betInput,\n label: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Wager (Max: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: MAX_BET\n }), \")\"),\n disabled: gameInProgress,\n onChange: this.wagerOnChange,\n error: wagerInvalid,\n helperText: wagerInvalid ? wagerInvalidHelperText : \"\",\n type: \"number\",\n variant: \"filled\",\n style: {\n width: \"200px\"\n },\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n position: \"start\"\n }, \"$\")\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Total earnings this session: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: gains\n }))), !gameInProgress ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.startOnClick,\n disabled: wagerInvalid || !this.canStartGame()\n }, \"Start\")) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.playerHit\n }, \"Hit\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n color: \"secondary\",\n onClick: this.playerStay\n }, \"Stay\")), (gameInProgress || result !== Result.Pending) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Player\"), playerHand.cards.map((card, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n key: i\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), playerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Dealer\"), dealerHand.cards.map((card, i) => // Hide every card except the first while game is in progress\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n hidden: gameInProgress && i !== 0,\n key: i\n })), !gameInProgress && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), dealerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))))), result !== Result.Pending && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, result, this.isPlayerWinResult(result) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You gained \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n })), result === Result.DealerWon && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n }))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Blackjack.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Blackjack; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./CardDeck/Deck */ 985);\n/* harmony import */ var _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CardDeck/Hand */ 413);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 1389);\n/* harmony import */ var _CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./CardDeck/ReactCard */ 559);\n/* harmony import */ var _ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../ui/React/MuiTextField */ 987);\n/* harmony import */ var _ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ui/React/MuiButton */ 487);\n/* harmony import */ var _ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ui/React/MuiPaper */ 560);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n\n\n\n\nconst MAX_BET = 100e6;\nvar Result;\n\n(function (Result) {\n Result[\"Pending\"] = \"\";\n Result[\"PlayerWon\"] = \"You won!\";\n Result[\"PlayerWonByBlackjack\"] = \"You Won! Blackjack!\";\n Result[\"DealerWon\"] = \"You lost!\";\n Result[\"Tie\"] = \"Push! (Tie)\";\n})(Result || (Result = {}));\n\nclass Blackjack extends _Game__WEBPACK_IMPORTED_MODULE_2__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"canStartGame\", () => {\n const {\n p\n } = this.props;\n const {\n bet\n } = this.state;\n return p.canAfford(bet);\n });\n\n _defineProperty(this, \"startGame\", () => {\n if (!this.canStartGame()) {\n return;\n } // Take money from player right away so that player's dont just \"leave\" to avoid the loss (I mean they could\n // always reload without saving but w.e)\n\n\n this.props.p.loseMoney(this.state.bet);\n const playerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending\n }); // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\n\n if (this.getTrueHandValue(playerHand) === 21) {\n if (this.getTrueHandValue(dealerHand) === 21) {\n this.finishGame(Result.Tie);\n } else {\n this.finishGame(Result.PlayerWonByBlackjack);\n }\n } else if (this.getTrueHandValue(dealerHand) === 21) {\n // Check if dealer won by blackjack. We know at this point that the player does not also have blackjack.\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"getHandValue\", hand => {\n let result = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\n\n if (value >= 10) {\n result = result.map(x => x + 10);\n } else if (value === 1) {\n result = result.flatMap(x => [x + 1, x + 11]);\n } else {\n result = result.map(x => x + value);\n }\n }\n\n return result;\n });\n\n _defineProperty(this, \"getTrueHandValue\", hand => {\n const handValues = this.getHandValue(hand);\n const valuesUnder21 = handValues.filter(x => x <= 21);\n\n if (valuesUnder21.length > 0) {\n valuesUnder21.sort((a, b) => a - b);\n return valuesUnder21[valuesUnder21.length - 1];\n } else {\n // Just return the first value. It doesnt really matter anyways since hand is buted\n return handValues[0];\n }\n });\n\n _defineProperty(this, \"getHandDisplayValues\", hand => {\n const handValues = this.getHandValue(hand);\n\n if (this.isHandBusted(hand)) {\n // Hand is busted so just return the 1st value, doesn't really matter\n return [...new Set([handValues[0]])];\n } else {\n return [...new Set(handValues.filter(x => x <= 21))];\n }\n });\n\n _defineProperty(this, \"isHandBusted\", hand => {\n return this.getTrueHandValue(hand) > 21;\n });\n\n _defineProperty(this, \"playerHit\", event => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n this.setState({\n playerHand: newHand\n }); // Check if player busted, and finish the game if so\n\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n });\n\n _defineProperty(this, \"playerStay\", event => {\n if (!event.isTrusted) {\n return;\n } // Determine if Dealer needs to hit. A dealer must hit if they have 16 or lower.\n // If the dealer has a Soft 17 (Ace + 6), then they stay.\n\n\n let newDealerHand = this.state.dealerHand;\n\n while (true) {\n // The dealer's \"true\" hand value is the 2nd one if its 21 or less (the 2nd value is always guaranteed\n // to be equal or larger). Otherwise its the 1st.\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n\n if (dealerHandValue <= 16) {\n newDealerHand = newDealerHand.addCards(this.deck.safeDrawCard());\n } else {\n break;\n }\n }\n\n this.setState({\n dealerHand: newDealerHand\n }); // If dealer has busted, then player wins\n\n if (this.isHandBusted(newDealerHand)) {\n this.finishGame(Result.PlayerWon);\n } else {\n const dealerHandValue = this.getTrueHandValue(newDealerHand);\n const playerHandValue = this.getTrueHandValue(this.state.playerHand); // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\n\n if (dealerHandValue > 21 || playerHandValue > 21) {\n throw new Error(\"Someone busted when not expected to\");\n }\n\n if (playerHandValue > dealerHandValue) {\n this.finishGame(Result.PlayerWon);\n } else if (playerHandValue < dealerHandValue) {\n this.finishGame(Result.DealerWon);\n } else {\n this.finishGame(Result.Tie);\n }\n }\n });\n\n _defineProperty(this, \"finishGame\", result => {\n let gains = 0;\n\n if (this.isPlayerWinResult(result)) {\n gains = this.state.bet; // We 2x the gains because we took away money at the start, so we need to give the original bet back.\n\n this.win(this.props.p, 2 * gains);\n } else if (result === Result.DealerWon) {\n gains = -1 * this.state.bet;\n this.win(this.props.p, -this.state.bet); // Get the original bet back\n // Dont need to take money here since we already did it at the start\n } else if (result === Result.Tie) {\n this.win(this.props.p, this.state.bet); // Get the original bet back\n }\n\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains\n });\n });\n\n _defineProperty(this, \"isPlayerWinResult\", result => {\n return result === Result.PlayerWon || result === Result.PlayerWonByBlackjack;\n });\n\n _defineProperty(this, \"wagerOnChange\", event => {\n const {\n p\n } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\n\n if (isNaN(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not a valid number\"\n });\n } else if (wager <= 0) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Must bet a postive amount\"\n });\n } else if (wager > MAX_BET) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Exceeds max bet\"\n });\n } else if (!p.canAfford(wager)) {\n this.setState({\n bet: 0,\n betInput,\n wagerInvalid: true,\n wagerInvalidHelperText: \"Not enough money\"\n });\n } else {\n // Valid wager\n this.setState({\n bet: wager,\n betInput,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\",\n result: Result.Pending // Reset previous game status to clear the win/lose text UI\n\n });\n }\n });\n\n _defineProperty(this, \"startOnClick\", event => {\n // Protect against scripting...although maybe this would be fun to automate\n if (!event.isTrusted) {\n return;\n }\n\n if (!this.state.wagerInvalid) {\n this.startGame();\n }\n });\n\n this.deck = new _CardDeck_Deck__WEBPACK_IMPORTED_MODULE_3__[/* Deck */ \"a\"](5); // 5-deck multideck\n\n const initialBet = 1e6;\n this.state = {\n playerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n dealerHand: new _CardDeck_Hand__WEBPACK_IMPORTED_MODULE_4__[/* Hand */ \"a\"]([]),\n bet: initialBet,\n betInput: String(initialBet),\n gameInProgress: false,\n result: Result.Pending,\n gains: 0,\n wagerInvalid: false,\n wagerInvalidHelperText: \"\"\n };\n }\n\n render() {\n const {\n betInput,\n playerHand,\n dealerHand,\n gameInProgress,\n result,\n wagerInvalid,\n wagerInvalidHelperText,\n gains\n } = this.state; // Get the player totals to display.\n\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiTextField__WEBPACK_IMPORTED_MODULE_7__[/* MuiTextField */ \"a\"], {\n value: betInput,\n label: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Wager (Max: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: MAX_BET\n }), \")\"),\n disabled: gameInProgress,\n onChange: this.wagerOnChange,\n error: wagerInvalid,\n helperText: wagerInvalid ? wagerInvalidHelperText : \"\",\n type: \"number\",\n variant: \"filled\",\n style: {\n width: \"200px\"\n },\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n position: \"start\"\n }, \"$\")\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Total earnings this session: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: gains\n }))), !gameInProgress ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.startOnClick,\n disabled: wagerInvalid || !this.canStartGame()\n }, \"Start\")) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n onClick: this.playerHit\n }, \"Hit\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiButton__WEBPACK_IMPORTED_MODULE_8__[/* MuiButton */ \"a\"], {\n color: \"secondary\",\n onClick: this.playerStay\n }, \"Stay\")), (gameInProgress || result !== Result.Pending) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Player\"), playerHand.cards.map((card, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n key: i\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), playerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_MuiPaper__WEBPACK_IMPORTED_MODULE_9__[/* MuiPaper */ \"a\"], {\n variant: \"outlined\",\n elevation: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Dealer\"), dealerHand.cards.map((card, i) => // Hide every card except the first while game is in progress\n react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CardDeck_ReactCard__WEBPACK_IMPORTED_MODULE_6__[/* ReactCard */ \"a\"], {\n card: card,\n hidden: gameInProgress && i !== 0,\n key: i\n })), !gameInProgress && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"Value(s): \"), dealerHandValues.map((value, i) => react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, value))))), result !== Result.Pending && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, result, this.isPlayerWinResult(result) && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You gained \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n })), result === Result.DealerWon && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \" You lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: this.state.bet\n }))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Blackjack.tsx?"); /***/ }), -/* 983 */ +/* 985 */ /*!*************************************!*\ !*** ./src/Casino/CardDeck/Deck.ts ***! \*************************************/ @@ -6459,11 +6461,11 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deck; });\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ 190);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 984);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nclass Deck {\n // Support multiple decks\n constructor(numDecks = 1) {\n _defineProperty(this, \"cards\", []);\n\n this.numDecks = numDecks;\n this.reset();\n }\n\n shuffle() {\n this.cards = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"])(this.cards); // Just use lodash\n }\n\n drawCard() {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift(); // Guaranteed to return a Card since we throw an Error if array is empty\n } // Draws a card, resetting the deck beforehands if the Deck is empty\n\n\n safeDrawCard() {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n } // Reset the deck back to the original 52 cards and shuffle it\n\n\n reset() {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Clubs));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Diamonds));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Hearts));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Spades));\n }\n }\n\n this.shuffle();\n }\n\n size() {\n return this.cards.length;\n }\n\n isEmpty() {\n return this.cards.length === 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Deck.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Deck; });\n/* harmony import */ var _Card__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Card */ 190);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash */ 986);\n/* harmony import */ var lodash__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash__WEBPACK_IMPORTED_MODULE_1__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\nclass Deck {\n // Support multiple decks\n constructor(numDecks = 1) {\n _defineProperty(this, \"cards\", []);\n\n this.numDecks = numDecks;\n this.reset();\n }\n\n shuffle() {\n this.cards = Object(lodash__WEBPACK_IMPORTED_MODULE_1__[\"shuffle\"])(this.cards); // Just use lodash\n }\n\n drawCard() {\n if (this.cards.length == 0) {\n throw new Error(\"Tried to draw card from empty deck\");\n }\n\n return this.cards.shift(); // Guaranteed to return a Card since we throw an Error if array is empty\n } // Draws a card, resetting the deck beforehands if the Deck is empty\n\n\n safeDrawCard() {\n if (this.cards.length === 0) {\n this.reset();\n }\n\n return this.drawCard();\n } // Reset the deck back to the original 52 cards and shuffle it\n\n\n reset() {\n this.cards = [];\n\n for (let i = 1; i <= 13; ++i) {\n for (let j = 0; j < this.numDecks; ++j) {\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Clubs));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Diamonds));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Hearts));\n this.cards.push(new _Card__WEBPACK_IMPORTED_MODULE_0__[/* Card */ \"a\"](i, _Card__WEBPACK_IMPORTED_MODULE_0__[/* Suit */ \"b\"].Spades));\n }\n }\n\n this.shuffle();\n }\n\n size() {\n return this.cards.length;\n }\n\n isEmpty() {\n return this.cards.length === 0;\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CardDeck/Deck.ts?"); /***/ }), -/* 984 */, -/* 985 */ +/* 986 */, +/* 987 */ /*!***************************************!*\ !*** ./src/ui/React/MuiTextField.tsx ***! \***************************************/ @@ -6472,10 +6474,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiTextField; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 371);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's TextField component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst backgroundColorStyles = {\n backgroundColor: \"rgba(57, 54, 54, 0.9)\",\n \"&:hover\": {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n }\n};\nconst formControlStyles = {\n border: \"1px solid #e2e2e1\",\n overflow: \"hidden\",\n borderRadius: 4,\n color: \"white\",\n ...backgroundColorStyles\n};\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...formControlStyles\n }\n});\nconst useInputStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...backgroundColorStyles,\n color: \"white\"\n },\n focused: {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n },\n disabled: {\n color: \"white\"\n }\n});\nconst useLabelStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n color: \"white\"\n },\n focused: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n },\n disabled: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n }\n});\nconst MuiTextField = props => {\n var _props$InputProps, _props$InputLabelProp;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n },\n InputProps: {\n classes: { ...useInputStyles(),\n ...((_props$InputProps = props.InputProps) === null || _props$InputProps === void 0 ? void 0 : _props$InputProps.classes)\n },\n ...props.InputProps\n },\n InputLabelProps: {\n classes: { ...useLabelStyles(),\n ...((_props$InputLabelProp = props.InputLabelProps) === null || _props$InputLabelProp === void 0 ? void 0 : _props$InputLabelProp.classes)\n },\n ...props.InputLabelProps\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiTextField.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MuiTextField; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material */ 373);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Wrapper around material-ui's TextField component that styles it with\n * Bitburner's UI theme\n */\n\n\n\nconst backgroundColorStyles = {\n backgroundColor: \"rgba(57, 54, 54, 0.9)\",\n \"&:hover\": {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n }\n};\nconst formControlStyles = {\n border: \"1px solid #e2e2e1\",\n overflow: \"hidden\",\n borderRadius: 4,\n color: \"white\",\n ...backgroundColorStyles\n};\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...formControlStyles\n }\n});\nconst useInputStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: { ...backgroundColorStyles,\n color: \"white\"\n },\n focused: {\n backgroundColor: \"rgba(70, 70, 70, 0.9)\"\n },\n disabled: {\n color: \"white\"\n }\n});\nconst useLabelStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n root: {\n color: \"white\"\n },\n focused: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n },\n disabled: {\n color: \"white !important\" // Need important to override styles from FormLabel\n\n }\n});\nconst MuiTextField = props => {\n var _props$InputProps, _props$InputLabelProp;\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], _extends({}, props, {\n classes: { ...useStyles(),\n ...props.classes\n },\n InputProps: {\n classes: { ...useInputStyles(),\n ...((_props$InputProps = props.InputProps) === null || _props$InputProps === void 0 ? void 0 : _props$InputProps.classes)\n },\n ...props.InputProps\n },\n InputLabelProps: {\n classes: { ...useLabelStyles(),\n ...((_props$InputLabelProp = props.InputLabelProps) === null || _props$InputLabelProp === void 0 ? void 0 : _props$InputLabelProp.classes)\n },\n ...props.InputLabelProps\n }\n }));\n};\n\n//# sourceURL=webpack:///./src/ui/React/MuiTextField.tsx?"); /***/ }), -/* 986 */ +/* 988 */ /*!*********************************!*\ !*** ./src/Casino/CoinFlip.tsx ***! \*********************************/ @@ -6484,10 +6486,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoinFlip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ 61);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 10e3;\nclass CoinFlip extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n this.state = {\n investment: 1000,\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \" \"),\n status: \"\",\n playLock: false\n };\n this.play = this.play.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n play(guess) {\n if (this.reachedLimit(this.props.p)) return;\n const v = _RNG__WEBPACK_IMPORTED_MODULE_2__[/* BadRNG */ \"a\"].random();\n let letter;\n\n if (v < 0.5) {\n letter = \"H\";\n } else {\n letter = \"T\";\n }\n\n const correct = guess === letter;\n this.setState({\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: correct ? \"text\" : \"failure\"\n }, letter),\n status: correct ? \" win!\" : \"lose!\",\n playLock: true\n });\n setTimeout(() => this.setState({\n playLock: false\n }), 250);\n\n if (correct) {\n this.win(this.props.p, this.state.investment);\n } else {\n this.win(this.props.p, -this.state.investment);\n }\n\n if (this.reachedLimit(this.props.p)) return;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | `, this.state.result, ` | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"text\"\n }, \"Play for: \"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n value: this.state.investment\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"H\")),\n text: \"Head!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"T\")),\n text: \"Tail!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CoinFlip.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CoinFlip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./utils */ 61);\n/**\n * React Subcomponent for displaying a location's UI, when that location is a gym\n *\n * This subcomponent renders all of the buttons for training at the gym\n */\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 10e3;\nclass CoinFlip extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n this.state = {\n investment: 1000,\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \" \"),\n status: \"\",\n playLock: false\n };\n this.play = this.play.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n play(guess) {\n if (this.reachedLimit(this.props.p)) return;\n const v = _RNG__WEBPACK_IMPORTED_MODULE_2__[/* BadRNG */ \"a\"].random();\n let letter;\n\n if (v < 0.5) {\n letter = \"H\";\n } else {\n letter = \"T\";\n }\n\n const correct = guess === letter;\n this.setState({\n result: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: correct ? \"text\" : \"failure\"\n }, letter),\n status: correct ? \" win!\" : \"lose!\",\n playLock: true\n });\n setTimeout(() => this.setState({\n playLock: false\n }), 250);\n\n if (correct) {\n this.win(this.props.p, this.state.investment);\n } else {\n this.win(this.props.p, -this.state.investment);\n }\n\n if (this.reachedLimit(this.props.p)) return;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | `, this.state.result, ` | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `| | | |`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, `+———————+`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"text\"\n }, \"Play for: \"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n value: this.state.investment\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"H\")),\n text: \"Head!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_4__[/* trusted */ \"a\"])(() => this.play(\"T\")),\n text: \"Tail!\",\n disabled: this.state.playLock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/CoinFlip.tsx?"); /***/ }), -/* 987 */ +/* 989 */ /*!*********************************!*\ !*** ./src/Casino/Roulette.tsx ***! \*********************************/ @@ -6496,10 +6498,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Roulette; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 1e7;\n\nfunction isRed(n) {\n return [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36].includes(n);\n}\n\nconst redNumbers = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36];\nconst strategies = {\n Red: {\n match: n => {\n if (n === 0) return false;\n return redNumbers.includes(n);\n },\n payout: 1\n },\n Black: {\n match: n => {\n return !redNumbers.includes(n);\n },\n payout: 1\n },\n Odd: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 1;\n },\n payout: 1\n },\n Even: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 0;\n },\n payout: 1\n },\n High: {\n match: n => {\n if (n === 0) return false;\n return n > 18;\n },\n payout: 1\n },\n Low: {\n match: n => {\n if (n === 0) return false;\n return n < 19;\n },\n payout: 1\n },\n Third1: {\n match: n => {\n if (n === 0) return false;\n return n <= 12;\n },\n payout: 2\n },\n Third2: {\n match: n => {\n if (n === 0) return false;\n return n >= 13 && n <= 24;\n },\n payout: 2\n },\n Third3: {\n match: n => {\n if (n === 0) return false;\n return n >= 25;\n },\n payout: 2\n }\n};\n\nfunction Single(s) {\n return {\n match: n => {\n return s === n;\n },\n payout: 36\n };\n}\n\nclass Roulette extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_4__[/* WHRNG */ \"b\"](new Date().getTime());\n this.state = {\n investment: 1000,\n canPlay: true,\n status: \"waiting\",\n n: 0,\n lock: true,\n strategy: {\n payout: 0,\n match: () => {\n return false;\n }\n }\n };\n this.step = this.step.bind(this);\n this.currentNumber = this.currentNumber.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n if (!this.state.lock) {\n this.setState({\n n: Math.floor(Math.random() * 37)\n });\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n currentNumber() {\n if (this.state.n === 0) return \"0\";\n const color = isRed(this.state.n) ? \"R\" : \"B\";\n return `${this.state.n}${color}`;\n }\n\n play(s) {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n canPlay: false,\n lock: false,\n status: \"playing\",\n strategy: s\n });\n setTimeout(() => {\n let n = Math.floor(this.rng.random() * 37);\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let gain = 0;\n let playerWin = this.state.strategy.match(n); // oh yeah, the house straight up cheats. Try finding the seed now!\n\n if (playerWin && Math.random() > 0.9) {\n playerWin = false;\n\n while (this.state.strategy.match(n)) {\n n++;\n }\n }\n\n if (playerWin) {\n gain = this.state.investment * this.state.strategy.payout;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"won \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gain\n }));\n } else {\n gain = -this.state.investment;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: -gain\n }));\n }\n\n this.win(this.props.p, gain);\n this.setState({\n canPlay: true,\n lock: true,\n status: status,\n n: n\n });\n this.reachedLimit(this.props.p);\n }, 1600);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.currentNumber()), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"3\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(3)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"6\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(6)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"9\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(9)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(12)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"15\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(15)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"18\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(18)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"21\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(21)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(24)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"27\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(27)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"30\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(30)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"33\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(33)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(36)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"2\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(2)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"5\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(5)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"8\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(8)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"11\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(11)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"14\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(14)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"17\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(17)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"20\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(20)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"23\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(23)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"26\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(26)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"29\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(29)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"32\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(32)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"35\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(35)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(1)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"4\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(4)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"7\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(7)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"10\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(10)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(13)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"16\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(16)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"19\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(19)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"22\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(22)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(25)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"28\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(28)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"31\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(31)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"34\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(34)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1 to 12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third1))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13 to 24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third2))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25 to 36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third3))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Red\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Red))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Black\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Black))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Odd\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Odd))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Even\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Even))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"High\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.High))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Low\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Low))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"0\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(0)))\n }))))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Roulette.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Roulette; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\nconst minPlay = 0;\nconst maxPlay = 1e7;\n\nfunction isRed(n) {\n return [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36].includes(n);\n}\n\nconst redNumbers = [1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36];\nconst strategies = {\n Red: {\n match: n => {\n if (n === 0) return false;\n return redNumbers.includes(n);\n },\n payout: 1\n },\n Black: {\n match: n => {\n return !redNumbers.includes(n);\n },\n payout: 1\n },\n Odd: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 1;\n },\n payout: 1\n },\n Even: {\n match: n => {\n if (n === 0) return false;\n return n % 2 === 0;\n },\n payout: 1\n },\n High: {\n match: n => {\n if (n === 0) return false;\n return n > 18;\n },\n payout: 1\n },\n Low: {\n match: n => {\n if (n === 0) return false;\n return n < 19;\n },\n payout: 1\n },\n Third1: {\n match: n => {\n if (n === 0) return false;\n return n <= 12;\n },\n payout: 2\n },\n Third2: {\n match: n => {\n if (n === 0) return false;\n return n >= 13 && n <= 24;\n },\n payout: 2\n },\n Third3: {\n match: n => {\n if (n === 0) return false;\n return n >= 25;\n },\n payout: 2\n }\n};\n\nfunction Single(s) {\n return {\n match: n => {\n return s === n;\n },\n payout: 36\n };\n}\n\nclass Roulette extends _Game__WEBPACK_IMPORTED_MODULE_3__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_4__[/* WHRNG */ \"b\"](new Date().getTime());\n this.state = {\n investment: 1000,\n canPlay: true,\n status: \"waiting\",\n n: 0,\n lock: true,\n strategy: {\n payout: 0,\n match: () => {\n return false;\n }\n }\n };\n this.step = this.step.bind(this);\n this.currentNumber = this.currentNumber.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n if (!this.state.lock) {\n this.setState({\n n: Math.floor(Math.random() * 37)\n });\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n currentNumber() {\n if (this.state.n === 0) return \"0\";\n const color = isRed(this.state.n) ? \"R\" : \"B\";\n return `${this.state.n}${color}`;\n }\n\n play(s) {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n canPlay: false,\n lock: false,\n status: \"playing\",\n strategy: s\n });\n setTimeout(() => {\n let n = Math.floor(this.rng.random() * 37);\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let gain = 0;\n let playerWin = this.state.strategy.match(n); // oh yeah, the house straight up cheats. Try finding the seed now!\n\n if (playerWin && Math.random() > 0.9) {\n playerWin = false;\n\n while (this.state.strategy.match(n)) {\n n++;\n }\n }\n\n if (playerWin) {\n gain = this.state.investment * this.state.strategy.payout;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"won \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gain\n }));\n } else {\n gain = -this.state.investment;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"lost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: -gain\n }));\n }\n\n this.win(this.props.p, gain);\n this.setState({\n canPlay: true,\n lock: true,\n status: status,\n n: n\n });\n this.reachedLimit(this.props.p);\n }, 1600);\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.currentNumber()), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"table\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"3\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(3)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"6\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(6)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"9\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(9)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(12)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"15\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(15)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"18\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(18)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"21\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(21)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(24)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"27\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(27)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"30\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(30)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"33\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(33)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(36)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"2\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(2)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"5\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(5)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"8\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(8)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"11\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(11)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"14\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(14)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"17\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(17)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"20\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(20)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"23\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(23)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"26\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(26)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"29\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(29)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"32\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(32)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"35\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(35)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(1)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"4\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(4)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"7\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(7)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"10\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(10)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(13)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"16\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(16)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"19\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(19)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"22\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(22)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(25)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"28\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(28)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"31\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(31)))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"34\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(34)))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"1 to 12\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third1))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"13 to 24\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third2))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 4\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"25 to 36\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Third3))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Red\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Red))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Black\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Black))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Odd\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Odd))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Even\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Even))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"High\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.High))\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", {\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Low\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(strategies.Low))\n }))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"tr\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"td\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"0\",\n disabled: !this.state.canPlay,\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(() => this.play(Single(0)))\n }))))));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Casino/Roulette.tsx?"); /***/ }), -/* 988 */ +/* 990 */ /*!************************************!*\ !*** ./src/Casino/SlotMachine.tsx ***! \************************************/ @@ -6508,10 +6510,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlotMachine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RNG */ 278);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Game */ 283);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n// statically shuffled array of symbols.\nconst symbols = [\"D\", \"C\", \"$\", \"?\", \"♥\", \"A\", \"C\", \"B\", \"C\", \"E\", \"B\", \"E\", \"C\", \"*\", \"D\", \"♥\", \"B\", \"A\", \"A\", \"A\", \"C\", \"A\", \"D\", \"B\", \"E\", \"?\", \"D\", \"*\", \"@\", \"♥\", \"B\", \"E\", \"?\"];\n\nfunction getPayout(s, n) {\n switch (s) {\n case \"$\":\n return [20, 200, 1000][n];\n\n case \"@\":\n return [8, 80, 400][n];\n\n case \"♥\":\n case \"?\":\n return [6, 20, 150][n];\n\n case \"D\":\n case \"E\":\n return [1, 8, 30][n];\n\n default:\n return [1, 5, 20][n];\n }\n}\n\nconst payLines = [// lines\n[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]], [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4]], [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4]], // Vs\n[[2, 0], [1, 1], [0, 2], [1, 3], [2, 4]], [[0, 0], [1, 1], [2, 2], [1, 3], [0, 4]], // rest\n[[0, 0], [1, 1], [1, 2], [1, 3], [0, 4]], [[2, 0], [1, 1], [1, 2], [1, 3], [2, 4]], [[1, 0], [0, 1], [0, 2], [0, 3], [1, 4]], [[1, 0], [2, 1], [2, 2], [2, 3], [1, 4]]];\nconst minPlay = 0;\nconst maxPlay = 1e6;\nclass SlotMachine extends _Game__WEBPACK_IMPORTED_MODULE_4__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_3__[/* WHRNG */ \"b\"](this.props.p.totalPlaytime);\n this.state = {\n index: [0, 0, 0, 0, 0],\n investment: 1000,\n locks: [0, 0, 0, 0, 0],\n canPlay: true,\n status: \"waiting\"\n };\n this.play = this.play.bind(this);\n this.lock = this.lock.bind(this);\n this.unlock = this.unlock.bind(this);\n this.step = this.step.bind(this);\n this.checkWinnings = this.checkWinnings.bind(this);\n this.getTable = this.getTable.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n let stoppedOne = false;\n const index = this.state.index.slice();\n\n for (const i in index) {\n if (index[i] === this.state.locks[i] && !stoppedOne) continue;\n index[i] = (index[i] + 1) % symbols.length;\n stoppedOne = true;\n }\n\n this.setState({\n index: index\n });\n\n if (stoppedOne && index.every((e, i) => e === this.state.locks[i])) {\n this.checkWinnings();\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n getTable() {\n return [[symbols[(this.state.index[0] + symbols.length - 1) % symbols.length], symbols[(this.state.index[1] + symbols.length - 1) % symbols.length], symbols[(this.state.index[2] + symbols.length - 1) % symbols.length], symbols[(this.state.index[3] + symbols.length - 1) % symbols.length], symbols[(this.state.index[4] + symbols.length - 1) % symbols.length]], [symbols[this.state.index[0]], symbols[this.state.index[1]], symbols[this.state.index[2]], symbols[this.state.index[3]], symbols[this.state.index[4]]], [symbols[(this.state.index[0] + 1) % symbols.length], symbols[(this.state.index[1] + 1) % symbols.length], symbols[(this.state.index[2] + 1) % symbols.length], symbols[(this.state.index[3] + 1) % symbols.length], symbols[(this.state.index[4] + 1) % symbols.length]]];\n }\n\n play() {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n status: \"playing\"\n });\n this.win(this.props.p, -this.state.investment);\n if (!this.state.canPlay) return;\n this.unlock();\n setTimeout(this.lock, this.rng.random() * 2000 + 1000);\n }\n\n lock() {\n this.setState({\n locks: [Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length)]\n });\n }\n\n checkWinnings() {\n const t = this.getTable();\n\n const getPaylineData = function (payline) {\n const data = [];\n\n for (const point of payline) {\n data.push(t[point[0]][point[1]]);\n }\n\n return data;\n };\n\n const countSequence = function (data) {\n let count = 1;\n\n for (let i = 1; i < data.length; i++) {\n if (data[i] !== data[i - 1]) break;\n count++;\n }\n\n return count;\n };\n\n let gains = -this.state.investment;\n\n for (const payline of payLines) {\n const data = getPaylineData(payline);\n const count = countSequence(data);\n if (count < 3) continue;\n const payout = getPayout(data[0], count - 3);\n gains += this.state.investment * payout;\n this.win(this.props.p, this.state.investment * payout);\n }\n\n this.setState({\n status: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, gains > 0 ? \"gained\" : \"lost\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: Math.abs(gains)\n })),\n canPlay: true\n });\n if (this.reachedLimit(this.props.p)) return;\n }\n\n unlock() {\n this.setState({\n locks: [-1, -1, -1, -1, -1],\n canPlay: false\n });\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n render() {\n const t = this.getTable(); // prettier-ignore\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", t[0][0], \" | \", t[0][1], \" | \", t[0][2], \" | \", t[0][3], \" | \", t[0][4], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[this.state.index[0]], \" | \", symbols[this.state.index[1]], \" | \", symbols[this.state.index[2]], \" | \", symbols[this.state.index[3]], \" | \", symbols[this.state.index[4]], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[(this.state.index[0] + 1) % symbols.length], \" | \", symbols[(this.state.index[1] + 1) % symbols.length], \" | \", symbols[(this.state.index[2] + 1) % symbols.length], \" | \", symbols[(this.state.index[3] + 1) % symbols.length], \" | \", symbols[(this.state.index[4] + 1) % symbols.length], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(this.play),\n text: \"Spin!\",\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Pay lines\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"----- \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 ----- \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7 -----\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7^\\xB7\\xB7 \\\\\\xB7\\xB7\\xB7/ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7/\\xB7\\\\\\xB7 \\xB7\\\\\\xB7/\\xB7 \\xB7---\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7v\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7---\\xB7 /\\xB7\\xB7\\xB7\\\\ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7\"));\n }\n\n} // https://felgo.com/doc/how-to-make-a-slot-game-tutorial/\n\n//# sourceURL=webpack:///./src/Casino/SlotMachine.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return SlotMachine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ui/React/Money */ 13);\n/* harmony import */ var _RNG__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RNG */ 279);\n/* harmony import */ var _Game__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Game */ 284);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./utils */ 61);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n\n\n\n\n\n\n// statically shuffled array of symbols.\nconst symbols = [\"D\", \"C\", \"$\", \"?\", \"♥\", \"A\", \"C\", \"B\", \"C\", \"E\", \"B\", \"E\", \"C\", \"*\", \"D\", \"♥\", \"B\", \"A\", \"A\", \"A\", \"C\", \"A\", \"D\", \"B\", \"E\", \"?\", \"D\", \"*\", \"@\", \"♥\", \"B\", \"E\", \"?\"];\n\nfunction getPayout(s, n) {\n switch (s) {\n case \"$\":\n return [20, 200, 1000][n];\n\n case \"@\":\n return [8, 80, 400][n];\n\n case \"♥\":\n case \"?\":\n return [6, 20, 150][n];\n\n case \"D\":\n case \"E\":\n return [1, 8, 30][n];\n\n default:\n return [1, 5, 20][n];\n }\n}\n\nconst payLines = [// lines\n[[0, 0], [0, 1], [0, 2], [0, 3], [0, 4]], [[1, 0], [1, 1], [1, 2], [1, 3], [1, 4]], [[2, 0], [2, 1], [2, 2], [2, 3], [2, 4]], // Vs\n[[2, 0], [1, 1], [0, 2], [1, 3], [2, 4]], [[0, 0], [1, 1], [2, 2], [1, 3], [0, 4]], // rest\n[[0, 0], [1, 1], [1, 2], [1, 3], [0, 4]], [[2, 0], [1, 1], [1, 2], [1, 3], [2, 4]], [[1, 0], [0, 1], [0, 2], [0, 3], [1, 4]], [[1, 0], [2, 1], [2, 2], [2, 3], [1, 4]]];\nconst minPlay = 0;\nconst maxPlay = 1e6;\nclass SlotMachine extends _Game__WEBPACK_IMPORTED_MODULE_4__[/* Game */ \"a\"] {\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", -1);\n\n this.rng = new _RNG__WEBPACK_IMPORTED_MODULE_3__[/* WHRNG */ \"b\"](this.props.p.totalPlaytime);\n this.state = {\n index: [0, 0, 0, 0, 0],\n investment: 1000,\n locks: [0, 0, 0, 0, 0],\n canPlay: true,\n status: \"waiting\"\n };\n this.play = this.play.bind(this);\n this.lock = this.lock.bind(this);\n this.unlock = this.unlock.bind(this);\n this.step = this.step.bind(this);\n this.checkWinnings = this.checkWinnings.bind(this);\n this.getTable = this.getTable.bind(this);\n this.updateInvestment = this.updateInvestment.bind(this);\n }\n\n componentDidMount() {\n this.interval = window.setInterval(this.step, 50);\n }\n\n step() {\n let stoppedOne = false;\n const index = this.state.index.slice();\n\n for (const i in index) {\n if (index[i] === this.state.locks[i] && !stoppedOne) continue;\n index[i] = (index[i] + 1) % symbols.length;\n stoppedOne = true;\n }\n\n this.setState({\n index: index\n });\n\n if (stoppedOne && index.every((e, i) => e === this.state.locks[i])) {\n this.checkWinnings();\n }\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n getTable() {\n return [[symbols[(this.state.index[0] + symbols.length - 1) % symbols.length], symbols[(this.state.index[1] + symbols.length - 1) % symbols.length], symbols[(this.state.index[2] + symbols.length - 1) % symbols.length], symbols[(this.state.index[3] + symbols.length - 1) % symbols.length], symbols[(this.state.index[4] + symbols.length - 1) % symbols.length]], [symbols[this.state.index[0]], symbols[this.state.index[1]], symbols[this.state.index[2]], symbols[this.state.index[3]], symbols[this.state.index[4]]], [symbols[(this.state.index[0] + 1) % symbols.length], symbols[(this.state.index[1] + 1) % symbols.length], symbols[(this.state.index[2] + 1) % symbols.length], symbols[(this.state.index[3] + 1) % symbols.length], symbols[(this.state.index[4] + 1) % symbols.length]]];\n }\n\n play() {\n if (this.reachedLimit(this.props.p)) return;\n this.setState({\n status: \"playing\"\n });\n this.win(this.props.p, -this.state.investment);\n if (!this.state.canPlay) return;\n this.unlock();\n setTimeout(this.lock, this.rng.random() * 2000 + 1000);\n }\n\n lock() {\n this.setState({\n locks: [Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length), Math.floor(this.rng.random() * symbols.length)]\n });\n }\n\n checkWinnings() {\n const t = this.getTable();\n\n const getPaylineData = function (payline) {\n const data = [];\n\n for (const point of payline) {\n data.push(t[point[0]][point[1]]);\n }\n\n return data;\n };\n\n const countSequence = function (data) {\n let count = 1;\n\n for (let i = 1; i < data.length; i++) {\n if (data[i] !== data[i - 1]) break;\n count++;\n }\n\n return count;\n };\n\n let gains = -this.state.investment;\n\n for (const payline of payLines) {\n const data = getPaylineData(payline);\n const count = countSequence(data);\n if (count < 3) continue;\n const payout = getPayout(data[0], count - 3);\n gains += this.state.investment * payout;\n this.win(this.props.p, this.state.investment * payout);\n }\n\n this.setState({\n status: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, gains > 0 ? \"gained\" : \"lost\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: Math.abs(gains)\n })),\n canPlay: true\n });\n if (this.reachedLimit(this.props.p)) return;\n }\n\n unlock() {\n this.setState({\n locks: [-1, -1, -1, -1, -1],\n canPlay: false\n });\n }\n\n updateInvestment(e) {\n let investment = parseInt(e.currentTarget.value);\n\n if (isNaN(investment)) {\n investment = minPlay;\n }\n\n if (investment > maxPlay) {\n investment = maxPlay;\n }\n\n if (investment < minPlay) {\n investment = minPlay;\n }\n\n this.setState({\n investment: investment\n });\n }\n\n render() {\n const t = this.getTable(); // prettier-ignore\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", t[0][0], \" | \", t[0][1], \" | \", t[0][2], \" | \", t[0][3], \" | \", t[0][4], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[this.state.index[0]], \" | \", symbols[this.state.index[1]], \" | \", symbols[this.state.index[2]], \" | \", symbols[this.state.index[3]], \" | \", symbols[this.state.index[4]], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | | | | | | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"| | \", symbols[(this.state.index[0] + 1) % symbols.length], \" | \", symbols[(this.state.index[1] + 1) % symbols.length], \" | \", symbols[(this.state.index[2] + 1) % symbols.length], \" | \", symbols[(this.state.index[3] + 1) % symbols.length], \" | \", symbols[(this.state.index[4] + 1) % symbols.length], \" | |\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"+\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014\\u2014+\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n type: \"number\",\n className: \"text-input\",\n onChange: this.updateInvestment,\n placeholder: \"Amount to play\",\n value: this.state.investment,\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n onClick: Object(_utils__WEBPACK_IMPORTED_MODULE_5__[/* trusted */ \"a\"])(this.play),\n text: \"Spin!\",\n disabled: !this.state.canPlay\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, this.state.status), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Pay lines\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"----- \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 ----- \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7 -----\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7^\\xB7\\xB7 \\\\\\xB7\\xB7\\xB7/ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7/\\xB7\\\\\\xB7 \\xB7\\\\\\xB7/\\xB7 \\xB7---\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7v\\xB7\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7 \\xB7\\xB7\\xB7\\xB7\\xB7\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"\\xB7---\\xB7 /\\xB7\\xB7\\xB7\\\\ \\\\\\xB7\\xB7\\xB7/\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, \"/\\xB7\\xB7\\xB7\\\\ \\xB7\\xB7\\xB7\\xB7\\xB7 \\xB7---\\xB7\"));\n }\n\n} // https://felgo.com/doc/how-to-make-a-slot-game-tutorial/\n\n//# sourceURL=webpack:///./src/Casino/SlotMachine.tsx?"); /***/ }), -/* 989 */ +/* 991 */ /*!******************************************!*\ !*** ./src/ui/React/CorruptableText.tsx ***! \******************************************/ @@ -6523,7 +6525,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CorruptableText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction replace(str, i, char) {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\nfunction randomize(char) {\n const randFrom = str => str[Math.floor(Math.random() * str.length)];\n\n const classes = [\"abcdefghijklmnopqrstuvwxyz\", \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\", \"1234567890\", \" _\", \"()[]{}<>\"];\n const other = `!@#$%^&*()_+|\\\\';\"/.,?\\`~`;\n\n for (const c of classes) {\n if (c.includes(char)) return randFrom(c);\n }\n\n return randFrom(other);\n}\n\nfunction CorruptableText(props) {\n const [content, setContent] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.content);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n let counter = 5;\n const id = setInterval(() => {\n counter--;\n if (counter > 0) return;\n counter = Math.random() * 5;\n const index = Math.random() * content.length;\n const letter = content.charAt(index);\n setContent(replace(content, index, randomize(letter)));\n setTimeout(() => {\n setContent(content);\n }, 50);\n }, 100);\n return () => {\n clearInterval(id);\n };\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, content);\n}\n\n//# sourceURL=webpack:///./src/ui/React/CorruptableText.tsx?"); /***/ }), -/* 990 */ +/* 992 */ /*!***********************************!*\ !*** ./src/Locations/ui/City.tsx ***! \***********************************/ @@ -6532,10 +6534,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationCity; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Cities */ 104);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations */ 223);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\n\n\n\n\n\n\n\n\nfunction toLocation(router, location) {\n if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].TravelAgency) {\n router.toTravel();\n } else if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].WorldStockExchange) {\n router.toStockMarket();\n } else {\n router.toLocation(location);\n }\n}\n\nfunction LocationLetter(location) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n if (!location) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \"*\");\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n key: location.name,\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\",\n cursor: \"pointer\"\n },\n onClick: () => toLocation(router, location)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"X\"));\n}\n\nfunction ASCIICity(props) {\n const locationLettersRegex = /[A-Z]/g;\n const letterMap = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25\n };\n\n const lineElems = s => {\n const elems = [];\n const matches = [];\n let match;\n\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.city.locations[locationI]]));\n }\n\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems = [];\n const lines = props.city.asciiArt.split(\"\\n\");\n\n for (const i in lines) {\n elems.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, lineElems(lines[i])));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, elems);\n}\n\nfunction ListCity(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n const locationButtons = props.city.locations.map(locName => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: locName\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => toLocation(router, _Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][locName]),\n text: locName\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, locationButtons);\n}\n\nfunction LocationCity() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const city = _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][player.city];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, city.name), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListCity, {\n city: city\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIICity, {\n city: city\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/City.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return LocationCity; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Cities__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Cities */ 105);\n/* harmony import */ var _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../data/LocationNames */ 9);\n/* harmony import */ var _Locations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Locations */ 194);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for displaying a City's UI.\n * This UI shows all of the available locations in the city, and lets the player\n * visit those locations\n */\n\n\n\n\n\n\n\n\nfunction toLocation(router, location) {\n if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].TravelAgency) {\n router.toTravel();\n } else if (location.name === _data_LocationNames__WEBPACK_IMPORTED_MODULE_2__[/* LocationName */ \"a\"].WorldStockExchange) {\n router.toStockMarket();\n } else {\n router.toLocation(location);\n }\n}\n\nfunction LocationLetter(location) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n if (!location) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", null, \"*\");\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n key: location.name,\n className: \"tooltip\",\n style: {\n color: \"white\",\n whiteSpace: \"nowrap\",\n margin: \"0px\",\n padding: \"0px\",\n cursor: \"pointer\"\n },\n onClick: () => toLocation(router, location)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"b\", null, \"X\"));\n}\n\nfunction ASCIICity(props) {\n const locationLettersRegex = /[A-Z]/g;\n const letterMap = {\n A: 0,\n B: 1,\n C: 2,\n D: 3,\n E: 4,\n F: 5,\n G: 6,\n H: 7,\n I: 8,\n J: 9,\n K: 10,\n L: 11,\n M: 12,\n N: 13,\n O: 14,\n P: 15,\n Q: 16,\n R: 17,\n S: 18,\n T: 19,\n U: 20,\n V: 21,\n W: 22,\n X: 23,\n Y: 24,\n Z: 25\n };\n\n const lineElems = s => {\n const elems = [];\n const matches = [];\n let match;\n\n while ((match = locationLettersRegex.exec(s)) !== null) {\n matches.push(match);\n }\n\n if (matches.length === 0) {\n elems.push(s);\n return elems;\n }\n\n for (let i = 0; i < matches.length; i++) {\n const startI = i === 0 ? 0 : matches[i - 1].index + 1;\n const endI = matches[i].index;\n elems.push(s.slice(startI, endI));\n const locationI = letterMap[s[matches[i].index]];\n elems.push(LocationLetter(_Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][props.city.locations[locationI]]));\n }\n\n elems.push(s.slice(matches[matches.length - 1].index + 1));\n return elems;\n };\n\n const elems = [];\n const lines = props.city.asciiArt.split(\"\\n\");\n\n for (const i in lines) {\n elems.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n key: i\n }, lineElems(lines[i])));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, elems);\n}\n\nfunction ListCity(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Router();\n const locationButtons = props.city.locations.map(locName => {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: locName\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: () => toLocation(router, _Locations__WEBPACK_IMPORTED_MODULE_3__[/* Locations */ \"a\"][locName]),\n text: locName\n }));\n });\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", null, locationButtons);\n}\n\nfunction LocationCity() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_6__[/* use */ \"b\"].Player();\n const city = _Cities__WEBPACK_IMPORTED_MODULE_1__[/* Cities */ \"a\"][player.city];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, city.name), _Settings_Settings__WEBPACK_IMPORTED_MODULE_4__[/* Settings */ \"a\"].DisableASCIIArt ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ListCity, {\n city: city\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](ASCIICity, {\n city: city\n }));\n}\n\n//# sourceURL=webpack:///./src/Locations/ui/City.tsx?"); /***/ }), -/* 991 */ +/* 993 */ /*!******************************************!*\ !*** ./src/Programs/ui/ProgramsRoot.tsx ***! \******************************************/ @@ -6544,10 +6546,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProgramsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ProgramHelpers */ 443);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material */ 133);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 26);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 582);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ 105);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\nfunction ProgramsRoot() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, \"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, Object(_ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getAvailableCreatePrograms */ \"a\"])(player).map(program => {\n const create = program.create;\n if (create === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n key: program.name,\n title: create.tooltip\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n onClick: () => {\n player.startCreateProgramWork(program.name, create.time, create.level);\n router.toWork();\n }\n }, program.name));\n }))));\n}\n\n//# sourceURL=webpack:///./src/Programs/ui/ProgramsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ProgramsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../ProgramHelpers */ 444);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material */ 133);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 25);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material */ 582);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material */ 102);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Button */ 48);\n\n\n\n\n\nfunction ProgramsRoot() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, \"This page displays any programs that you are able to create. Writing the code for a program takes time, which can vary based on how complex the program is. If you are working on creating a program you can cancel at any time. Your progress will be saved and you can continue later.\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, Object(_ProgramHelpers__WEBPACK_IMPORTED_MODULE_2__[/* getAvailableCreatePrograms */ \"a\"])(player).map(program => {\n const create = program.create;\n if (create === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n key: program.name,\n title: create.tooltip\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n onClick: () => {\n player.startCreateProgramWork(program.name, create.time, create.level);\n router.toWork();\n }\n }, program.name));\n }))));\n}\n\n//# sourceURL=webpack:///./src/Programs/ui/ProgramsRoot.tsx?"); /***/ }), -/* 992 */ +/* 994 */ /*!**************************************!*\ !*** ./src/ScriptEditor/ui/Root.tsx ***! \**************************************/ @@ -6556,11 +6558,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Root; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @monaco-editor/react */ 993);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OptionsPopup */ 1006);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1007);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(js_beautify__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Fconf/Fconf */ 311);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Script/Script */ 285);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../TextFile */ 196);\n/* harmony import */ var _Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Script/RamCalculations */ 432);\n/* harmony import */ var _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Script/RamCalculationErrorCodes */ 230);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ScriptEditor/CursorPositions */ 562);\n/* harmony import */ var _NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../NetscriptDefinitions */ 563);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../NetscriptFunctions */ 392);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet symbols = [];\n\n(function () {\n const ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__[/* NetscriptFunctions */ \"a\"])({});\n\n function populate(ns) {\n let symbols = [];\n const keys = Object.keys(ns);\n\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\"];\n symbols = symbols.filter(symbol => !exclude.includes(symbol));\n})();\n\n/*\n\n*/\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet lastPosition = null;\nfunction Root(props) {\n const editorRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [filename, setFilename] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.filename ? props.filename : lastFilename);\n const [code, setCode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.code ? props.code : lastCode);\n const [ram, setRAM] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"RAM: ???\");\n const [options, setOptions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n theme: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme,\n insertSpaces: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces\n }); // store the last known state in case we need to restart without nano.\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (props.filename === \"\") return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save() {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n\n if (position !== null) {\n _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].saveCursor(filename, {\n row: position.lineNumber,\n column: position.column\n });\n }\n }\n\n lastPosition = null;\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].isRunning && _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialSteps */ \"d\"].TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Leave the script name as 'n00dles'!\");\n return;\n }\n\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Please copy and paste the code from the tutorial!\");\n return;\n } //Save the script\n\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n } // If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n\n if (filename == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You must specify a filename!\");\n return;\n }\n\n if (filename !== \".fconf\" && !Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__[/* isValidFilePath */ \"g\"])(filename)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\");\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n if (filename === \".fconf\") {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__[/* parseFconfSettings */ \"c\"])(code);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`Invalid .fconf file: ${e}`);\n return;\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__[/* isScriptFilename */ \"a\"])(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return;\n }\n } //If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n props.router.toTerminal();\n return;\n }\n }\n\n const textFile = new _TextFile__WEBPACK_IMPORTED_MODULE_11__[/* TextFile */ \"a\"](filename, code);\n server.textFiles.push(textFile);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n props.router.toTerminal();\n }\n\n function beautify() {\n if (editorRef.current === null) return;\n const pretty = Object(js_beautify__WEBPACK_IMPORTED_MODULE_5__[\"js_beautify\"])(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\"\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event) {\n lastFilename = filename;\n setFilename(event.target.value);\n }\n\n function openOptions() {\n const id = \"script-editor-options-popup\";\n const newOptions = {\n theme: \"\",\n insertSpaces: false\n };\n Object.assign(newOptions, options);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(id, _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__[/* OptionsPopup */ \"a\"], {\n id: id,\n options: newOptions,\n save: options => {\n setOptions(options);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme = options.theme;\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces = options.insertSpaces;\n }\n });\n }\n\n function updateCode(newCode) {\n if (newCode === undefined) return;\n lastCode = newCode;\n\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n\n setCode(newCode);\n }\n\n async function updateRAM() {\n const codeCopy = code + \"\";\n const ramUsage = await Object(_Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__[/* calculateRamUsage */ \"a\"])(codeCopy, props.player.getCurrentServer().scripts);\n\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage));\n return;\n }\n\n switch (ramUsage) {\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].ImportError:\n {\n setRAM(\"RAM: Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].URLImportError:\n {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].SyntaxError:\n default:\n {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n\n return new Promise(() => undefined);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function maybeSave(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys) return; //Ctrl + b\n\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor) {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].getCursor(filename);\n if (position.row !== -1) editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column\n });else if (lastPosition !== null) editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco) {\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet\n });\n }\n\n return {\n suggestions: suggestions\n };\n }\n });\n monaco.languages.typescript.javascriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-filename-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-filename-tag\",\n className: \"noselect\"\n }, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", {\n style: {\n backgroundColor: \"#555\"\n }\n }, \"Script name: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"script-editor-filename\",\n type: \"text\",\n maxLength: 100,\n tabIndex: 1,\n value: filename,\n onChange: onFilenameChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"options\",\n onClick: openOptions\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n beforeMount: beforeMount,\n onMount: onMount,\n loading: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Loading script editor!\"),\n height: \"90%\",\n defaultLanguage: \"javascript\",\n defaultValue: code,\n onChange: updateCode,\n theme: options.theme,\n options: options\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-buttons-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Beautify\",\n onClick: beautify\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-status-text\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, ram), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: save\n }, \"Save & Close (Ctrl/Cmd + b)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\"\n }, \"Netscript Documentation\")));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/Root.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Root; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @monaco-editor/react */ 995);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./OptionsPopup */ 1008);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! js-beautify */ 1009);\n/* harmony import */ var js_beautify__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(js_beautify__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Terminal/DirectoryHelpers */ 86);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../Fconf/Fconf */ 313);\n/* harmony import */ var _Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Script/ScriptHelpersTS */ 83);\n/* harmony import */ var _Script_Script__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../Script/Script */ 286);\n/* harmony import */ var _TextFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../TextFile */ 197);\n/* harmony import */ var _Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Script/RamCalculations */ 433);\n/* harmony import */ var _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Script/RamCalculationErrorCodes */ 230);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../ScriptEditor/CursorPositions */ 562);\n/* harmony import */ var _NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../NetscriptDefinitions */ 563);\n/* harmony import */ var _NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../NetscriptFunctions */ 393);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../InteractiveTutorial */ 49);\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nlet symbols = [];\n\n(function () {\n const ns = Object(_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_17__[/* NetscriptFunctions */ \"a\"])({});\n\n function populate(ns) {\n let symbols = [];\n const keys = Object.keys(ns);\n\n for (const key of keys) {\n if (typeof ns[key] === \"object\") {\n symbols.push(key);\n symbols = symbols.concat(populate(ns[key]));\n }\n\n if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\"];\n symbols = symbols.filter(symbol => !exclude.includes(symbol));\n})();\n\n/*\n\n*/\n// How to load function definition in monaco\n// https://github.com/Microsoft/monaco-editor/issues/1415\n// https://microsoft.github.io/monaco-editor/api/modules/monaco.languages.html\n// https://www.npmjs.com/package/@monaco-editor/react#development-playground\n// https://microsoft.github.io/monaco-editor/playground.html#extending-language-services-custom-languages\n// https://github.com/threehams/typescript-error-guide/blob/master/stories/components/Editor.tsx#L11-L39\n// These variables are used to reload a script when it's clicked on. Because we\n// won't have references to the old script.\nlet lastFilename = \"\";\nlet lastCode = \"\";\nlet lastPosition = null;\nfunction Root(props) {\n const editorRef = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [filename, setFilename] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.filename ? props.filename : lastFilename);\n const [code, setCode] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.code ? props.code : lastCode);\n const [ram, setRAM] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"RAM: ???\");\n const [options, setOptions] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])({\n theme: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme,\n insertSpaces: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces\n }); // store the last known state in case we need to restart without nano.\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (props.filename === \"\") return;\n lastFilename = props.filename;\n lastCode = props.code;\n lastPosition = null;\n }, []);\n\n function save() {\n if (editorRef.current !== null) {\n const position = editorRef.current.getPosition();\n\n if (position !== null) {\n _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].saveCursor(filename, {\n row: position.lineNumber,\n column: position.column\n });\n }\n }\n\n lastPosition = null;\n\n if (_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].isRunning && _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* ITutorial */ \"a\"].currStep === _InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialSteps */ \"d\"].TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (filename !== \"n00dles.script\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Leave the script name as 'n00dles'!\");\n return;\n }\n\n if (code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Please copy and paste the code from the tutorial!\");\n return;\n } //Save the script\n\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n } // If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n return Object(_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_19__[/* iTutorialNextStep */ \"b\"])();\n }\n\n if (filename == \"\") {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"You must specify a filename!\");\n return;\n }\n\n if (filename !== \".fconf\" && !Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_6__[/* isValidFilePath */ \"g\"])(filename)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\");\n return;\n }\n\n const server = props.player.getCurrentServer();\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n\n if (filename === \".fconf\") {\n try {\n Object(_Fconf_Fconf__WEBPACK_IMPORTED_MODULE_8__[/* parseFconfSettings */ \"c\"])(code);\n } catch (e) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`Invalid .fconf file: ${e}`);\n return;\n }\n } else if (Object(_Script_ScriptHelpersTS__WEBPACK_IMPORTED_MODULE_9__[/* isScriptFilename */ \"a\"])(filename)) {\n //If the current script already exists on the server, overwrite it\n for (let i = 0; i < server.scripts.length; i++) {\n if (filename == server.scripts[i].filename) {\n server.scripts[i].saveScript(code, props.player.currentServer, server.scripts);\n props.router.toTerminal();\n return;\n }\n } //If the current script does NOT exist, create a new one\n\n\n const script = new _Script_Script__WEBPACK_IMPORTED_MODULE_10__[/* Script */ \"a\"]();\n script.saveScript(code, props.player.currentServer, server.scripts);\n server.scripts.push(script);\n } else if (filename.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === filename) {\n server.textFiles[i].write(code);\n props.router.toTerminal();\n return;\n }\n }\n\n const textFile = new _TextFile__WEBPACK_IMPORTED_MODULE_11__[/* TextFile */ \"a\"](filename, code);\n server.textFiles.push(textFile);\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(\"Invalid filename. Must be either a script (.script, .js, or .ns) or \" + \" or text file (.txt)\");\n return;\n }\n\n props.router.toTerminal();\n }\n\n function beautify() {\n if (editorRef.current === null) return;\n const pretty = Object(js_beautify__WEBPACK_IMPORTED_MODULE_5__[\"js_beautify\"])(code, {\n indent_with_tabs: !options.insertSpaces,\n indent_size: 4,\n brace_style: \"preserve-inline\"\n });\n editorRef.current.setValue(pretty);\n }\n\n function onFilenameChange(event) {\n lastFilename = filename;\n setFilename(event.target.value);\n }\n\n function openOptions() {\n const id = \"script-editor-options-popup\";\n const newOptions = {\n theme: \"\",\n insertSpaces: false\n };\n Object.assign(newOptions, options);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_3__[/* createPopup */ \"a\"])(id, _OptionsPopup__WEBPACK_IMPORTED_MODULE_4__[/* OptionsPopup */ \"a\"], {\n id: id,\n options: newOptions,\n save: options => {\n setOptions(options);\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoTheme = options.theme;\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].MonacoInsertSpaces = options.insertSpaces;\n }\n });\n }\n\n function updateCode(newCode) {\n if (newCode === undefined) return;\n lastCode = newCode;\n\n if (editorRef.current !== null) {\n lastPosition = editorRef.current.getPosition();\n }\n\n setCode(newCode);\n }\n\n async function updateRAM() {\n const codeCopy = code + \"\";\n const ramUsage = await Object(_Script_RamCalculations__WEBPACK_IMPORTED_MODULE_12__[/* calculateRamUsage */ \"a\"])(codeCopy, props.player.getCurrentServer().scripts);\n\n if (ramUsage > 0) {\n setRAM(\"RAM: \" + _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__[/* numeralWrapper */ \"a\"].formatRAM(ramUsage));\n return;\n }\n\n switch (ramUsage) {\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].ImportError:\n {\n setRAM(\"RAM: Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].URLImportError:\n {\n setRAM(\"RAM: HTTP Import Error\");\n break;\n }\n\n case _Script_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_13__[/* RamCalculationErrorCode */ \"a\"].SyntaxError:\n default:\n {\n setRAM(\"RAM: Syntax Error\");\n break;\n }\n }\n\n return new Promise(() => undefined);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(updateRAM, 1000);\n return () => clearInterval(id);\n }, [code]);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function maybeSave(event) {\n if (_Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].DisableHotkeys) return; //Ctrl + b\n\n if (event.keyCode == 66 && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n save();\n }\n }\n\n document.addEventListener(\"keydown\", maybeSave);\n return () => document.removeEventListener(\"keydown\", maybeSave);\n });\n\n function onMount(editor) {\n editorRef.current = editor;\n if (editorRef.current === null) return;\n const position = _ScriptEditor_CursorPositions__WEBPACK_IMPORTED_MODULE_15__[/* CursorPositions */ \"a\"].getCursor(filename);\n if (position.row !== -1) editorRef.current.setPosition({\n lineNumber: position.row,\n column: position.column\n });else if (lastPosition !== null) editorRef.current.setPosition({\n lineNumber: lastPosition.lineNumber,\n column: lastPosition.column + 1\n });\n editorRef.current.focus();\n }\n\n function beforeMount(monaco) {\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\n\n for (const symbol of symbols) {\n suggestions.push({\n label: symbol,\n kind: monaco.languages.CompletionItemKind.Function,\n insertText: symbol,\n insertTextRules: monaco.languages.CompletionItemInsertTextRule.InsertAsSnippet\n });\n }\n\n return {\n suggestions: suggestions\n };\n }\n });\n monaco.languages.typescript.javascriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(_NetscriptDefinitions__WEBPACK_IMPORTED_MODULE_16__[/* libSource */ \"a\"], \"netscript.d.ts\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-filename-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-filename-tag\",\n className: \"noselect\"\n }, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", {\n style: {\n backgroundColor: \"#555\"\n }\n }, \"Script name: \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n id: \"script-editor-filename\",\n type: \"text\",\n maxLength: 100,\n tabIndex: 1,\n value: filename,\n onChange: onFilenameChange\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"options\",\n onClick: openOptions\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_monaco_editor_react__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n beforeMount: beforeMount,\n onMount: onMount,\n loading: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Loading script editor!\"),\n height: \"90%\",\n defaultLanguage: \"javascript\",\n defaultValue: code,\n onChange: updateCode,\n theme: options.theme,\n options: options\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n id: \"script-editor-buttons-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n text: \"Beautify\",\n onClick: beautify\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n id: \"script-editor-status-text\",\n style: {\n display: \"inline-block\",\n margin: \"10px\"\n }\n }, ram), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n onClick: save\n }, \"Save & Close (Ctrl/Cmd + b)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"std-button\",\n style: {\n display: \"inline-block\"\n },\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/index.html\"\n }, \"Netscript Documentation\")));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/Root.tsx?"); /***/ }), -/* 993 */, -/* 994 */, /* 995 */, /* 996 */, /* 997 */, @@ -6572,7 +6572,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 1003 */, /* 1004 */, /* 1005 */, -/* 1006 */ +/* 1006 */, +/* 1007 */, +/* 1008 */ /*!**********************************************!*\ !*** ./src/ScriptEditor/ui/OptionsPopup.tsx ***! \**********************************************/ @@ -6584,8 +6586,8 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return OptionsPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction OptionsPopup(props) {\n const [theme, setTheme] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.theme);\n const [insertSpaces, setInsertSpaces] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(props.options.insertSpaces);\n\n function save() {\n props.save({\n theme: theme,\n insertSpaces: insertSpaces\n });\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.id);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-container noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Theme: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"select\", {\n className: \"dropdown\",\n onChange: event => setTheme(event.target.value),\n defaultValue: theme\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"vs-dark\"\n }, \"vs-dark\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"option\", {\n value: \"light\"\n }, \"light\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"editor-options-line\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Use whitespace over tabs: \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n type: \"checkbox\",\n onChange: event => setInsertSpaces(event.target.checked),\n checked: insertSpaces\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_1__[/* StdButton */ \"a\"], {\n style: {\n width: \"50px\"\n },\n text: \"Save\",\n onClick: save\n }));\n}\n\n//# sourceURL=webpack:///./src/ScriptEditor/ui/OptionsPopup.tsx?"); /***/ }), -/* 1007 */, -/* 1008 */ +/* 1009 */, +/* 1010 */ /*!**********************************************!*\ !*** ./src/Milestones/ui/MilestonesRoot.tsx ***! \**********************************************/ @@ -6597,7 +6599,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return MilestonesRoot; });\n/* harmony import */ var _Milestones__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Milestones */ 564);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nfunction highestMilestone(p, milestones) {\n let n = -1;\n\n for (let i = 0; i < milestones.length; i++) {\n if (milestones[i].fulfilled(p)) n = i;\n }\n\n return n;\n}\n\nfunction MilestonesRoot(props) {\n const n = highestMilestone(props.player, _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"]);\n const milestones = _Milestones__WEBPACK_IMPORTED_MODULE_0__[/* Milestones */ \"a\"].map((milestone, i) => {\n if (i <= n + 1) {\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"ul\", {\n key: i\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"[\", milestone.fulfilled(props.player) ? \"x\" : \" \", \"] \", milestone.title));\n }\n });\n return react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"div\", {\n className: \"milestones-container\"\n }, react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h1\", null, \"Milestones\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"p\", null, \"Milestones don't reward you for completing them. They are here to guide you if you're lost. They will reset when you install Augmentations.\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"h2\", null, \"Completing fl1ght.exe\"), react__WEBPACK_IMPORTED_MODULE_1__[\"createElement\"](\"li\", null, milestones));\n}\n\n//# sourceURL=webpack:///./src/Milestones/ui/MilestonesRoot.tsx?"); /***/ }), -/* 1009 */ +/* 1011 */ /*!******************************************!*\ !*** ./src/Terminal/ui/TerminalRoot.tsx ***! \******************************************/ @@ -6606,10 +6608,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 372);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ITerminal */ 250);\n/* harmony import */ var _TerminalInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TerminalInput */ 1010);\n\n\n\n\n\n\n\n\n\n\n\nfunction ActionTimer({\n terminal\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: \"primary\",\n paragraph: false\n }, terminal.getProgressText());\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\nfunction TerminalRoot({\n terminal,\n router,\n player\n}) {\n const scrollHook = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => {\n if (terminal.pollChanges()) rerender();\n }, 100);\n return () => clearInterval(id);\n }, []);\n\n function doScroll() {\n const hook = scrollHook.current;\n\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setTimeout(doScroll, 50);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n width: \"100%\",\n minHeight: \"100vh\",\n display: \"flex\",\n alignItems: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n classes: {\n root: classes.list\n }\n }, terminal.outputHistory.map((item, i) => {\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Output */ \"b\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: item.color,\n paragraph: false\n }, item.text));\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Link */ \"a\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"secondary\",\n paragraph: false,\n onClick: () => terminal.connectToServer(player, item.hostname)\n }, \">\\xA0\", item.hostname));\n }), terminal.action !== null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ActionTimer, {\n terminal: terminal\n }), \" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: scrollHook\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n position: \"sticky\",\n bottom: 0,\n width: \"100%\",\n px: 0\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerminalInput__WEBPACK_IMPORTED_MODULE_9__[/* TerminalInput */ \"a\"], {\n player: player,\n router: router,\n terminal: terminal\n })));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItem */ 69);\n/* harmony import */ var _mui_material__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material */ 374);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _ITerminal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../ITerminal */ 250);\n/* harmony import */ var _TerminalInput__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./TerminalInput */ 1012);\n\n\n\n\n\n\n\n\n\n\n\nfunction ActionTimer({\n terminal\n}) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: \"primary\",\n paragraph: false\n }, terminal.getProgressText());\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"anywhere\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\nfunction TerminalRoot({\n terminal,\n router,\n player\n}) {\n const scrollHook = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => {\n if (terminal.pollChanges()) rerender();\n }, 100);\n return () => clearInterval(id);\n }, []);\n\n function doScroll() {\n const hook = scrollHook.current;\n\n if (hook !== null) {\n setTimeout(() => hook.scrollIntoView(true), 50);\n }\n }\n\n doScroll();\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n setTimeout(doScroll, 50);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n width: \"100%\",\n minHeight: \"100vh\",\n display: \"flex\",\n alignItems: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n classes: {\n root: classes.list\n }\n }, terminal.outputHistory.map((item, i) => {\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Output */ \"b\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: item.color,\n paragraph: false\n }, item.text));\n if (item instanceof _ITerminal__WEBPACK_IMPORTED_MODULE_8__[/* Link */ \"a\"]) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n key: i,\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"secondary\",\n paragraph: false,\n onClick: () => terminal.connectToServer(player, item.hostname)\n }, \">\\xA0\", item.hostname));\n }), terminal.action !== null && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_ListItem__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n classes: {\n root: classes.nopadding\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(ActionTimer, {\n terminal: terminal\n }), \" \")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n ref: scrollHook\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n position: \"sticky\",\n bottom: 0,\n width: \"100%\",\n px: 0\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_TerminalInput__WEBPACK_IMPORTED_MODULE_9__[/* TerminalInput */ \"a\"], {\n player: player,\n router: router,\n terminal: terminal\n })));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalRoot.tsx?"); /***/ }), -/* 1010 */ +/* 1012 */ /*!*******************************************!*\ !*** ./src/Terminal/ui/TerminalInput.tsx ***! \*******************************************/ @@ -6618,10 +6620,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalInput; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../determineAllPossibilitiesForTabCompletion */ 1011);\n/* harmony import */ var _tabCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tabCompletion */ 1013);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\"\n },\n input: {\n backgroundColor: \"#000\"\n },\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\n// Save command in case we de-load this screen.\nlet command = \"\";\nfunction TerminalInput({\n terminal,\n router,\n player\n}) {\n const terminalInput = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(command);\n const [possibilities, setPossibilities] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([]);\n const classes = useStyles();\n\n function saveValue(value) {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event) {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n\n break;\n\n case \"deletewordbefore\":\n // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n\n break;\n\n case \"deletewordafter\":\n // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n\n break;\n\n case \"clearafter\":\n // Deletes everything after cursor\n break;\n\n case \"clearbefore:\":\n // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n\n break;\n\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n\n ref.setSelectionRange(0, 0);\n break;\n\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n } // Catch all key inputs and redirect them to the terminal.\n\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function keyDown(event) {\n if (terminal.contractOpen) return;\n if (event.metaKey || event.ctrlKey) return;\n const ref = terminalInput.current;\n if (ref) ref.focus(); // Cancel action\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n }\n }\n\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n function onKeyDown(event) {\n // Run command.\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n } // Autocomplete\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].TAB && value !== \"\") {\n event.preventDefault();\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n\n if (index < -1) {\n index = 0;\n }\n\n const allPos = Object(_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__[/* determineAllPossibilitiesForTabCompletion */ \"a\"])(player, copy, index, terminal.cwd());\n\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n\n if (commandArray.length == 0) {\n return;\n }\n\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n const newValue = Object(_tabCompletion__WEBPACK_IMPORTED_MODULE_8__[/* tabCompletion */ \"a\"])(command, arg, allPos, value);\n\n if (typeof newValue === \"string\" && newValue !== \"\") {\n saveValue(newValue);\n }\n\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n } // Clear screen.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n } // Select previous command.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].UPARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].P && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n } // Select next command\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].DOWNARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].M && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n } // Extra Bash Emulation Hotkeys, must be enabled through .fconf\n\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].H || event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n } // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, possibilities.length > 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, \"Possible autocomplete candidate:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, possibilities.join(\" \"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"standard\",\n color: terminal.action === null ? \"primary\" : \"secondary\",\n autoFocus: true,\n disabled: terminal.action !== null,\n autoComplete: \"off\",\n classes: {\n root: classes.textfield\n },\n value: value,\n onChange: handleValueChange,\n inputRef: terminalInput,\n InputProps: {\n // for players to hook in\n id: \"terminal-input\",\n className: classes.input,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: terminal.action === null ? \"primary\" : \"secondary\",\n flexShrink: 0\n }, \"[\", player.getCurrentServer().hostname, \"\\xA0~\", terminal.cwd(), \"]>\\xA0\")),\n spellCheck: false,\n onKeyDown: onKeyDown\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalInput.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TerminalInput; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../determineAllPossibilitiesForTabCompletion */ 1013);\n/* harmony import */ var _tabCompletion__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../tabCompletion */ 1015);\n/* harmony import */ var _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../Fconf/FconfSettings */ 67);\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\"\n },\n input: {\n backgroundColor: \"#000\"\n },\n nopadding: {\n padding: theme.spacing(0)\n },\n preformatted: {\n whiteSpace: \"pre-wrap\",\n margin: theme.spacing(0)\n },\n list: {\n padding: theme.spacing(0),\n height: \"100%\"\n }\n}));\n// Save command in case we de-load this screen.\nlet command = \"\";\nfunction TerminalInput({\n terminal,\n router,\n player\n}) {\n const terminalInput = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useRef\"])(null);\n const [value, setValue] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(command);\n const [possibilities, setPossibilities] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])([]);\n const classes = useStyles();\n\n function saveValue(value) {\n command = value;\n setValue(value);\n }\n\n function handleValueChange(event) {\n saveValue(event.target.value);\n setPossibilities([]);\n }\n\n function modifyInput(mod) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n const inputText = ref.value;\n\n switch (mod.toLowerCase()) {\n case \"backspace\":\n if (start > 0 && start <= inputLength + 1) {\n saveValue(inputText.substr(0, start - 1) + inputText.substr(start));\n }\n\n break;\n\n case \"deletewordbefore\":\n // Delete rest of word before the cursor\n for (let delStart = start - 1; delStart > 0; --delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, delStart) + inputText.substr(start));\n return;\n }\n }\n\n break;\n\n case \"deletewordafter\":\n // Delete rest of word after the cursor\n for (let delStart = start + 1; delStart <= value.length + 1; ++delStart) {\n if (inputText.charAt(delStart) === \" \") {\n saveValue(inputText.substr(0, start) + inputText.substr(delStart));\n return;\n }\n }\n\n break;\n\n case \"clearafter\":\n // Deletes everything after cursor\n break;\n\n case \"clearbefore:\":\n // Deleetes everything before cursor\n break;\n }\n }\n\n function moveTextCursor(loc) {\n const ref = terminalInput.current;\n if (!ref) return;\n const inputLength = value.length;\n const start = ref.selectionStart;\n if (start === null) return;\n\n switch (loc.toLowerCase()) {\n case \"home\":\n ref.setSelectionRange(0, 0);\n break;\n\n case \"end\":\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n case \"prevchar\":\n if (start > 0) {\n ref.setSelectionRange(start - 1, start - 1);\n }\n\n break;\n\n case \"prevword\":\n for (let i = start - 2; i >= 0; --i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i + 1, i + 1);\n return;\n }\n }\n\n ref.setSelectionRange(0, 0);\n break;\n\n case \"nextchar\":\n ref.setSelectionRange(start + 1, start + 1);\n break;\n\n case \"nextword\":\n for (let i = start + 1; i <= inputLength; ++i) {\n if (ref.value.charAt(i) === \" \") {\n ref.setSelectionRange(i, i);\n return;\n }\n }\n\n ref.setSelectionRange(inputLength, inputLength);\n break;\n\n default:\n console.warn(\"Invalid loc argument in Terminal.moveTextCursor()\");\n break;\n }\n } // Catch all key inputs and redirect them to the terminal.\n\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n function keyDown(event) {\n if (terminal.contractOpen) return;\n if (event.metaKey || event.ctrlKey) return;\n const ref = terminalInput.current;\n if (ref) ref.focus(); // Cancel action\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].C && event.ctrlKey) {\n terminal.finishAction(router, player, true);\n }\n }\n\n document.addEventListener(\"keydown\", keyDown);\n return () => document.removeEventListener(\"keydown\", keyDown);\n });\n\n function onKeyDown(event) {\n // Run command.\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].ENTER && value !== \"\") {\n event.preventDefault();\n terminal.print(`[${player.getCurrentServer().hostname} ~${terminal.cwd()}]> ${value}`);\n terminal.executeCommands(router, player, value);\n saveValue(\"\");\n return;\n } // Autocomplete\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].TAB && value !== \"\") {\n event.preventDefault();\n let copy = value;\n const semiColonIndex = copy.lastIndexOf(\";\");\n\n if (semiColonIndex !== -1) {\n copy = copy.slice(semiColonIndex + 1);\n }\n\n copy = copy.trim();\n copy = copy.replace(/\\s\\s+/g, \" \");\n const commandArray = copy.split(\" \");\n let index = commandArray.length - 2;\n\n if (index < -1) {\n index = 0;\n }\n\n const allPos = Object(_determineAllPossibilitiesForTabCompletion__WEBPACK_IMPORTED_MODULE_7__[/* determineAllPossibilitiesForTabCompletion */ \"a\"])(player, copy, index, terminal.cwd());\n\n if (allPos.length == 0) {\n return;\n }\n\n let arg = \"\";\n let command = \"\";\n\n if (commandArray.length == 0) {\n return;\n }\n\n if (commandArray.length == 1) {\n command = commandArray[0];\n } else if (commandArray.length == 2) {\n command = commandArray[0];\n arg = commandArray[1];\n } else if (commandArray.length == 3) {\n command = commandArray[0] + \" \" + commandArray[1];\n arg = commandArray[2];\n } else {\n arg = commandArray.pop() + \"\";\n command = commandArray.join(\" \");\n }\n\n const newValue = Object(_tabCompletion__WEBPACK_IMPORTED_MODULE_8__[/* tabCompletion */ \"a\"])(command, arg, allPos, value);\n\n if (typeof newValue === \"string\" && newValue !== \"\") {\n saveValue(newValue);\n }\n\n if (Array.isArray(newValue)) {\n setPossibilities(newValue);\n }\n } // Clear screen.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].L && event.ctrlKey) {\n event.preventDefault();\n terminal.clear();\n } // Select previous command.\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].UPARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].P && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n }\n\n if (i != 0) {\n --terminal.commandHistoryIndex;\n }\n\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n const ref = terminalInput.current;\n\n if (ref) {\n setTimeout(function () {\n ref.selectionStart = ref.selectionEnd = 10000;\n }, 10);\n }\n } // Select next command\n\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].DOWNARROW || _Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS && event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].M && event.ctrlKey) {\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n event.preventDefault();\n }\n\n const i = terminal.commandHistoryIndex;\n const len = terminal.commandHistory.length;\n\n if (len == 0) {\n return;\n }\n\n if (i < 0 || i > len) {\n terminal.commandHistoryIndex = len;\n } // Latest command, put nothing\n\n\n if (i == len || i == len - 1) {\n terminal.commandHistoryIndex = len;\n saveValue(\"\");\n } else {\n ++terminal.commandHistoryIndex;\n const prevCommand = terminal.commandHistory[terminal.commandHistoryIndex];\n saveValue(prevCommand);\n }\n } // Extra Bash Emulation Hotkeys, must be enabled through .fconf\n\n\n if (_Fconf_FconfSettings__WEBPACK_IMPORTED_MODULE_9__[/* FconfSettings */ \"a\"].ENABLE_BASH_HOTKEYS) {\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].A && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"home\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].E && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"end\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"prevchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].B && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"prevword\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.ctrlKey) {\n event.preventDefault();\n moveTextCursor(\"nextchar\");\n }\n\n if (event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].F && event.altKey) {\n event.preventDefault();\n moveTextCursor(\"nextword\");\n }\n\n if ((event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].H || event.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_6__[/* KEY */ \"a\"].D) && event.ctrlKey) {\n modifyInput(\"backspace\");\n event.preventDefault();\n } // TODO AFTER THIS:\n // alt + d deletes word after cursor\n // ^w deletes word before cursor\n // ^k clears line after cursor\n // ^u clears line before cursor\n\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, possibilities.length > 0 && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, \"Possible autocomplete candidate:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n classes: {\n root: classes.preformatted\n },\n color: \"primary\",\n paragraph: false\n }, possibilities.join(\" \"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"standard\",\n color: terminal.action === null ? \"primary\" : \"secondary\",\n autoFocus: true,\n disabled: terminal.action !== null,\n autoComplete: \"off\",\n classes: {\n root: classes.textfield\n },\n value: value,\n onChange: handleValueChange,\n inputRef: terminalInput,\n InputProps: {\n // for players to hook in\n id: \"terminal-input\",\n className: classes.input,\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n color: terminal.action === null ? \"primary\" : \"secondary\",\n flexShrink: 0\n }, \"[\", player.getCurrentServer().hostname, \"\\xA0~\", terminal.cwd(), \"]>\\xA0\")),\n spellCheck: false,\n onKeyDown: onKeyDown\n }\n }));\n}\n\n//# sourceURL=webpack:///./src/Terminal/ui/TerminalInput.tsx?"); /***/ }), -/* 1011 */ +/* 1013 */ /*!*******************************************************************!*\ !*** ./src/Terminal/determineAllPossibilitiesForTabCompletion.ts ***! \*******************************************************************/ @@ -6630,10 +6632,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineAllPossibilitiesForTabCompletion; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DirectoryServerHelpers */ 1012);\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Alias */ 87);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Message/Message */ 97);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\n\n\n\n\n // An array of all Terminal commands\n\nconst commands = [\"alias\", \"analyze\", \"backdoor\", \"cat\", \"cd\", \"check\", \"clear\", \"cls\", \"connect\", \"download\", \"expr\", \"free\", \"hack\", \"help\", \"home\", \"hostname\", \"ifconfig\", \"kill\", \"killall\", \"ls\", \"lscpu\", \"mem\", \"mv\", \"nano\", \"ps\", \"rm\", \"run\", \"scan\", \"scan-analyze\", \"scp\", \"sudov\", \"tail\", \"theme\", \"top\"];\nfunction determineAllPossibilitiesForTabCompletion(p, input, index, currPath = \"\") {\n let allPos = [];\n allPos = allPos.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n let parentDirPath = \"\";\n let evaledParentDirPath = null; // Helper functions\n\n function addAllCodingContracts() {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles() {\n for (const file of currServ.messages) {\n if (!(file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"])) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages() {\n for (const file of currServ.messages) {\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"]) {\n allPos.push(file.filename);\n }\n }\n }\n\n function addAllPrograms() {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts() {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles() {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories() {\n // Directories are based on the currently evaluated path\n const subdirs = Object(_DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getSubdirectories */ \"a\"])(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n } // Convert from the real absolute path back to the original path used in the input\n\n\n function convertParentPath(filepath) {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(`convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`);\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n } // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n\n\n function processFilepath(filepath) {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd) {\n let t_cmd = cmd;\n\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n\n\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n } //Programs are on home computer\n\n\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n\n return allPos;\n } // Autocomplete the command\n\n\n if (index === -1) {\n return commands.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* Aliases */ \"a\"])).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n } // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n\n\n const commandArray = input.split(\" \");\n\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getAllParentDirectories */ \"c\"])(arg);\n evaledParentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(parentDirPath, currPath);\n\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n\n for (const i in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"][i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const iphostname in _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"]) {\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].ip);\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][currServ.serversOnNetwork[i]];\n\n if (serv == null) {\n continue;\n }\n\n allPos.push(serv.ip);\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n\n//# sourceURL=webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return determineAllPossibilitiesForTabCompletion; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/* harmony import */ var _DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DirectoryServerHelpers */ 1014);\n/* harmony import */ var _Alias__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Alias */ 87);\n/* harmony import */ var _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../DarkWeb/DarkWebItems */ 229);\n/* harmony import */ var _Message_Message__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../Message/Message */ 97);\n/* harmony import */ var _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../Server/AllServers */ 29);\n\n\n\n\n\n // An array of all Terminal commands\n\nconst commands = [\"alias\", \"analyze\", \"backdoor\", \"cat\", \"cd\", \"check\", \"clear\", \"cls\", \"connect\", \"download\", \"expr\", \"free\", \"hack\", \"help\", \"home\", \"hostname\", \"ifconfig\", \"kill\", \"killall\", \"ls\", \"lscpu\", \"mem\", \"mv\", \"nano\", \"ps\", \"rm\", \"run\", \"scan\", \"scan-analyze\", \"scp\", \"sudov\", \"tail\", \"theme\", \"top\"];\nfunction determineAllPossibilitiesForTabCompletion(p, input, index, currPath = \"\") {\n let allPos = [];\n allPos = allPos.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n const currServ = p.getCurrentServer();\n const homeComputer = p.getHomeComputer();\n let parentDirPath = \"\";\n let evaledParentDirPath = null; // Helper functions\n\n function addAllCodingContracts() {\n for (const cct of currServ.contracts) {\n allPos.push(cct.fn);\n }\n }\n\n function addAllLitFiles() {\n for (const file of currServ.messages) {\n if (!(file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"])) {\n allPos.push(file);\n }\n }\n }\n\n function addAllMessages() {\n for (const file of currServ.messages) {\n if (file instanceof _Message_Message__WEBPACK_IMPORTED_MODULE_4__[/* Message */ \"a\"]) {\n allPos.push(file.filename);\n }\n }\n }\n\n function addAllPrograms() {\n for (const program of homeComputer.programs) {\n allPos.push(program);\n }\n }\n\n function addAllScripts() {\n for (const script of currServ.scripts) {\n const res = processFilepath(script.filename);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllTextFiles() {\n for (const txt of currServ.textFiles) {\n const res = processFilepath(txt.fn);\n\n if (res) {\n allPos.push(res);\n }\n }\n }\n\n function addAllDirectories() {\n // Directories are based on the currently evaluated path\n const subdirs = Object(_DirectoryServerHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getSubdirectories */ \"a\"])(currServ, evaledParentDirPath == null ? \"/\" : evaledParentDirPath);\n\n for (let i = 0; i < subdirs.length; ++i) {\n const assembledDirPath = evaledParentDirPath == null ? subdirs[i] : evaledParentDirPath + subdirs[i];\n const res = processFilepath(assembledDirPath);\n\n if (res != null) {\n subdirs[i] = res;\n }\n }\n\n allPos = allPos.concat(subdirs);\n } // Convert from the real absolute path back to the original path used in the input\n\n\n function convertParentPath(filepath) {\n if (parentDirPath == null || evaledParentDirPath == null) {\n console.warn(`convertParentPath() called when paths are null`);\n return filepath;\n }\n\n if (!filepath.startsWith(evaledParentDirPath)) {\n console.warn(`convertParentPath() called for invalid path. (filepath=${filepath}) (evaledParentDirPath=${evaledParentDirPath})`);\n return filepath;\n }\n\n return parentDirPath + filepath.slice(evaledParentDirPath.length);\n } // Given an a full, absolute filepath, converts it to the proper value\n // for autocompletion purposes\n\n\n function processFilepath(filepath) {\n if (evaledParentDirPath) {\n if (filepath.startsWith(evaledParentDirPath)) {\n return convertParentPath(filepath);\n }\n } else if (parentDirPath !== \"\") {\n // If the parent directory is the root directory, but we're not searching\n // it from the root directory, we have to add the original path\n let t_parentDirPath = parentDirPath;\n\n if (!t_parentDirPath.endsWith(\"/\")) {\n t_parentDirPath += \"/\";\n }\n\n return parentDirPath + filepath;\n } else {\n return filepath;\n }\n\n return null;\n }\n\n function isCommand(cmd) {\n let t_cmd = cmd;\n\n if (!t_cmd.endsWith(\" \")) {\n t_cmd += \" \";\n }\n\n return input.startsWith(t_cmd);\n }\n /**\n * If the command starts with './' and the index == -1, then the user\n * has input ./partialexecutablename so autocomplete the script or program.\n * Put './' in front of each script/executable\n */\n\n\n if (isCommand(\"./\") && index == -1) {\n //All programs and scripts\n for (let i = 0; i < currServ.scripts.length; ++i) {\n allPos.push(\"./\" + currServ.scripts[i].filename);\n } //Programs are on home computer\n\n\n for (let i = 0; i < homeComputer.programs.length; ++i) {\n allPos.push(\"./\" + homeComputer.programs[i]);\n }\n\n return allPos;\n } // Autocomplete the command\n\n\n if (index === -1) {\n return commands.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* Aliases */ \"a\"])).concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n } // Since we're autocompleting an argument and not a command, the argument might\n // be a file/directory path. We have to account for that when autocompleting\n\n\n const commandArray = input.split(\" \");\n\n if (commandArray.length === 0) {\n console.warn(`Tab autocompletion logic reached invalid branch`);\n return allPos;\n }\n\n const arg = commandArray[commandArray.length - 1];\n parentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getAllParentDirectories */ \"c\"])(arg);\n evaledParentDirPath = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* evaluateDirectoryPath */ \"a\"])(parentDirPath, currPath);\n\n if (evaledParentDirPath === \"/\") {\n evaledParentDirPath = null;\n } else if (evaledParentDirPath == null) {\n return allPos; // Invalid path\n } else {\n evaledParentDirPath += \"/\";\n }\n\n if (isCommand(\"buy\")) {\n const options = [];\n\n for (const i in _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"]) {\n const item = _DarkWeb_DarkWebItems__WEBPACK_IMPORTED_MODULE_3__[/* DarkWebItems */ \"a\"][i];\n options.push(item.program);\n }\n\n return options.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_2__[/* GlobalAliases */ \"b\"]));\n }\n\n if (isCommand(\"scp\") && index === 1) {\n for (const iphostname in _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"]) {\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].ip);\n allPos.push(_Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][iphostname].hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"scp\") && index === 0) {\n addAllScripts();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"connect\")) {\n // All network connections\n for (let i = 0; i < currServ.serversOnNetwork.length; ++i) {\n const serv = _Server_AllServers__WEBPACK_IMPORTED_MODULE_5__[/* AllServers */ \"b\"][currServ.serversOnNetwork[i]];\n\n if (serv == null) {\n continue;\n }\n\n allPos.push(serv.ip);\n allPos.push(serv.hostname);\n }\n\n return allPos;\n }\n\n if (isCommand(\"kill\") || isCommand(\"tail\") || isCommand(\"mem\") || isCommand(\"check\")) {\n addAllScripts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"nano\")) {\n addAllScripts();\n addAllTextFiles();\n allPos.push(\".fconf\");\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"rm\")) {\n addAllScripts();\n addAllPrograms();\n addAllLitFiles();\n addAllTextFiles();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"run\")) {\n addAllScripts();\n addAllPrograms();\n addAllCodingContracts();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cat\")) {\n addAllMessages();\n addAllLitFiles();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"download\") || isCommand(\"mv\")) {\n addAllScripts();\n addAllTextFiles();\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"cd\")) {\n addAllDirectories();\n return allPos;\n }\n\n if (isCommand(\"ls\") && index === 0) {\n addAllDirectories();\n }\n\n return allPos;\n}\n\n//# sourceURL=webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts?"); /***/ }), -/* 1012 */ +/* 1014 */ /*!************************************************!*\ !*** ./src/Terminal/DirectoryServerHelpers.ts ***! \************************************************/ @@ -6645,7 +6647,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return getSubdirectories; });\n/* harmony import */ var _DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./DirectoryHelpers */ 86);\n/**\n * Helper functions that implement \"directory\" functionality in the Terminal.\n * These aren't \"real\" directories, it's more of a pseudo-directory implementation\n * that uses mainly string manipulation.\n *\n * This file contains function that deal with Server-related directory things.\n * Functions that deal with the string manipulation can be found in\n * ./DirectoryHelpers.ts\n */\n\n\n/**\n * Given a directory (by the full directory path) and a server, returns all\n * subdirectories of that directory. This is only for FIRST-LEVEl/immediate subdirectories\n */\nfunction getSubdirectories(serv, dir) {\n const res = [];\n\n if (!Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isValidDirectoryPath */ \"f\"])(dir)) {\n return res;\n }\n\n let t_dir = dir;\n\n if (!t_dir.endsWith(\"/\")) {\n t_dir += \"/\";\n }\n\n function processFile(fn) {\n if (t_dir === \"/\" && Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* isInRootDirectory */ \"e\"])(fn)) {\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(fn);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n } else if (fn.startsWith(t_dir)) {\n const remaining = fn.slice(t_dir.length);\n const subdir = Object(_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_0__[/* getFirstParentDirectory */ \"d\"])(remaining);\n\n if (subdir !== \"/\" && !res.includes(subdir)) {\n res.push(subdir);\n }\n }\n }\n\n for (const script of serv.scripts) {\n processFile(script.filename);\n }\n\n for (const txt of serv.textFiles) {\n processFile(txt.fn);\n }\n\n return res;\n}\n\n//# sourceURL=webpack:///./src/Terminal/DirectoryServerHelpers.ts?"); /***/ }), -/* 1013 */ +/* 1015 */ /*!***************************************!*\ !*** ./src/Terminal/tabCompletion.ts ***! \***************************************/ @@ -6657,7 +6659,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return tabCompletion; });\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n\n/**\n * Implements tab completion for the Terminal\n *\n * @param command {string} Terminal command, excluding the last incomplete argument\n * @param arg {string} Last argument that is being completed\n * @param allPossibilities {string[]} All values that `arg` can complete to\n */\n\nfunction tabCompletion(command, arg, allPossibilities, oldValue) {\n if (!(allPossibilities.constructor === Array)) {\n return;\n }\n\n if (!Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* containsAllStrings */ \"a\"])(allPossibilities)) {\n return;\n } // Remove all options in allPossibilities that do not match the current string\n // that we are attempting to autocomplete\n\n\n if (arg === \"\") {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(command.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n } else {\n for (let i = allPossibilities.length - 1; i >= 0; --i) {\n if (!allPossibilities[i].toLowerCase().startsWith(arg.toLowerCase())) {\n allPossibilities.splice(i, 1);\n }\n }\n }\n\n const semiColonIndex = oldValue.lastIndexOf(\";\");\n let val = \"\";\n\n if (allPossibilities.length === 0) {\n return;\n } else if (allPossibilities.length === 1) {\n if (arg === \"\") {\n //Autocomplete command\n val = allPossibilities[0] + \" \";\n } else {\n val = command + \" \" + allPossibilities[0];\n }\n\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return val;\n } else {\n // Replace only after the last semicolon\n return oldValue.slice(0, semiColonIndex + 1) + \" \" + val;\n }\n } else {\n const longestStartSubstr = Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_0__[/* longestCommonStart */ \"e\"])(allPossibilities);\n /**\n * If the longest common starting substring of remaining possibilities is the same\n * as whatevers already in terminal, just list all possible options. Otherwise,\n * change the input in the terminal to the longest common starting substr\n */\n\n if (arg === \"\") {\n if (longestStartSubstr === command) {\n return allPossibilities;\n } else {\n if (semiColonIndex === -1) {\n // No semicolon, so replace the whole command\n return longestStartSubstr;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${longestStartSubstr}`;\n }\n }\n } else {\n if (longestStartSubstr === arg) {\n // List all possible options\n return allPossibilities;\n } else {\n if (semiColonIndex == -1) {\n // No semicolon, so replace the whole command\n return `${command} ${longestStartSubstr}`;\n } else {\n // Replace only after the last semicolon\n return `${oldValue.slice(0, semiColonIndex + 1)} ${command} ${longestStartSubstr}`;\n }\n }\n }\n }\n}\n\n//# sourceURL=webpack:///./src/Terminal/tabCompletion.ts?"); /***/ }), -/* 1014 */ +/* 1016 */ /*!******************************************!*\ !*** ./src/Tutorial/ui/TutorialRoot.tsx ***! \******************************************/ @@ -6669,7 +6671,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return TutorialRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction TutorialRoot() {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Tutorial (AKA Links to Documentation)\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n id: \"tutorial-getting-started-link\",\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html\"\n }, \"Getting Started\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html\"\n }, \"Servers & Networking\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html\"\n }, \"Hacking\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html\"\n }, \"Scripts\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/netscript.html\"\n }, \"Netscript Programming Language\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html\"\n }, \"Traveling\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html\"\n }, \"Companies\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html\"\n }, \"Infiltration\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html\"\n }, \"Factions\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html\"\n }, \"Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n target: \"_blank\",\n href: \"https://bitburner.readthedocs.io/en/latest/shortcuts.html\"\n }, \"Keyboard Shortcuts\"));\n}\n\n//# sourceURL=webpack:///./src/Tutorial/ui/TutorialRoot.tsx?"); /***/ }), -/* 1015 */ +/* 1017 */ /*!****************************************************!*\ !*** ./src/ui/ActiveScripts/ActiveScriptsRoot.tsx ***! \****************************************************/ @@ -6678,10 +6680,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActiveScriptsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ScriptProduction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ScriptProduction */ 1016);\n/* harmony import */ var _ServerAccordions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ServerAccordions */ 1017);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\n\n\n\n\nfunction ActiveScriptsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptProduction__WEBPACK_IMPORTED_MODULE_1__[/* ScriptProduction */ \"a\"], props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordions__WEBPACK_IMPORTED_MODULE_2__[/* ServerAccordions */ \"a\"], props));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ActiveScriptsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ScriptProduction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ScriptProduction */ 1018);\n/* harmony import */ var _ServerAccordions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ServerAccordions */ 1019);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/**\n * Root React Component for the \"Active Scripts\" UI page. This page displays\n * and provides information about all of the player's scripts that are currently running\n */\n\n\n\n\nfunction ActiveScriptsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], null, \"This page displays a list of all of your scripts that are currently running across every machine. It also provides information about each script's production. The scripts are categorized by the hostname of the servers on which they are running.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ScriptProduction__WEBPACK_IMPORTED_MODULE_1__[/* ScriptProduction */ \"a\"], props), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordions__WEBPACK_IMPORTED_MODULE_2__[/* ServerAccordions */ \"a\"], props));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx?"); /***/ }), -/* 1016 */ +/* 1018 */ /*!***************************************************!*\ !*** ./src/ui/ActiveScripts/ScriptProduction.tsx ***! \***************************************************/ @@ -6690,10 +6692,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptProduction; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Context */ 43);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 333);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\"\n },\n size: {\n width: \"1px\"\n }\n}));\nfunction ScriptProduction(props) {\n const player = _Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n let onlineProduction = 0;\n\n for (const ws of props.workerScripts.values()) {\n onlineProduction += ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n size: \"small\",\n classes: {\n root: classes.size\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production of Active scripts:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: player.scriptProdSinceLastAug\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n style: {\n width: \"1px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production since last Aug installation:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"(\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__[/* MoneyRate */ \"a\"], {\n money: prodRateSinceLastAug\n }), \")\")))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ScriptProduction; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../React/MoneyRate */ 123);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Context */ 43);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/styles/createStyles */ 335);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/**\n * React Component for displaying the total production and production rate\n * of scripts on the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(theme => Object(_mui_styles_createStyles__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])({\n cell: {\n borderBottom: \"none\",\n padding: theme.spacing(1),\n margin: theme.spacing(1),\n whiteSpace: \"nowrap\"\n },\n size: {\n width: \"1px\"\n }\n}));\nfunction ScriptProduction(props) {\n const player = _Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const classes = useStyles();\n const prodRateSinceLastAug = player.scriptProdSinceLastAug / (player.playtimeSinceLastAug / 1000);\n let onlineProduction = 0;\n\n for (const ws of props.workerScripts.values()) {\n onlineProduction += ws.scriptRef.onlineMoneyMade / ws.scriptRef.onlineRunningTime;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n size: \"small\",\n classes: {\n root: classes.size\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production of Active scripts:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_1__[/* Money */ \"a\"], {\n money: player.scriptProdSinceLastAug\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n style: {\n width: \"1px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"Total online production since last Aug installation:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n align: \"left\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n variant: \"body2\"\n }, \"(\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_2__[/* MoneyRate */ \"a\"], {\n money: prodRateSinceLastAug\n }), \")\")))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx?"); /***/ }), -/* 1017 */ +/* 1019 */ /*!***************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordions.tsx ***! \***************************************************/ @@ -6702,10 +6704,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ServerAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerAccordion */ 1018);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/TextField */ 371);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TablePagination */ 1076);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 212);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/Search */ 1024);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__);\n/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\n\n\n\n\n\n\n\n\n // Map of server hostname -> all workerscripts on that server for all active scripts\n\nconst subscriberId = \"ActiveScriptsUI\";\nfunction ServerAccordions(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].addSubscriber({\n cb: rerender,\n id: subscriberId\n });\n return () => _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].removeSubscriber(subscriberId);\n }, []);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event) {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap = {};\n\n for (const ws of props.workerScripts.values()) {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getServer */ \"b\"])(ws.serverIp);\n\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.serverIp}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: []\n };\n data = serverToScriptMap[server.hostname];\n }\n\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(data => data && data.server.hostname.includes(filter));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n value: filter,\n onChange: handleFilterChange,\n color: \"primary\",\n autoFocus: true,\n variant: \"standard\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default.a, null),\n spellCheck: false\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n dense: true\n }, filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(data => {\n return data && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordion__WEBPACK_IMPORTED_MODULE_1__[/* ServerAccordion */ \"a\"], {\n key: data.server.hostname,\n server: data.server,\n workerScripts: data.workerScripts\n });\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: filtered.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordions; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ServerAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ServerAccordion */ 1020);\n/* harmony import */ var _mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/TextField */ 373);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TablePagination */ 1079);\n/* harmony import */ var _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Netscript/WorkerScriptStartStopEventEmitter */ 213);\n/* harmony import */ var _Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../Server/ServerHelpers */ 36);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 467);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/Search */ 1026);\n/* harmony import */ var _mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8__);\n/**\n * React Component for rendering the Accordion elements for all servers\n * on which scripts are running\n */\n\n\n\n\n\n\n\n\n // Map of server hostname -> all workerscripts on that server for all active scripts\n\nconst subscriberId = \"ActiveScriptsUI\";\nfunction ServerAccordions(props) {\n const [filter, setFilter] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(\"\");\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].addSubscriber({\n cb: rerender,\n id: subscriberId\n });\n return () => _Netscript_WorkerScriptStartStopEventEmitter__WEBPACK_IMPORTED_MODULE_5__[/* WorkerScriptStartStopEventEmitter */ \"a\"].removeSubscriber(subscriberId);\n }, []);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n function handleFilterChange(event) {\n setFilter(event.target.value);\n setPage(0);\n }\n\n const serverToScriptMap = {};\n\n for (const ws of props.workerScripts.values()) {\n const server = Object(_Server_ServerHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getServer */ \"b\"])(ws.serverIp);\n\n if (server == null) {\n console.warn(`WorkerScript has invalid IP address: ${ws.serverIp}`);\n continue;\n }\n\n let data = serverToScriptMap[server.hostname];\n\n if (data === undefined) {\n serverToScriptMap[server.hostname] = {\n server: server,\n workerScripts: []\n };\n data = serverToScriptMap[server.hostname];\n }\n\n if (data !== undefined) data.workerScripts.push(ws);\n }\n\n const filtered = Object.values(serverToScriptMap).filter(data => data && data.server.hostname.includes(filter));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TextField__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n value: filter,\n onChange: handleFilterChange,\n color: \"primary\",\n autoFocus: true,\n variant: \"standard\",\n InputProps: {\n startAdornment: react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_Search__WEBPACK_IMPORTED_MODULE_8___default.a, null),\n spellCheck: false\n }\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n dense: true\n }, filtered.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(data => {\n return data && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ServerAccordion__WEBPACK_IMPORTED_MODULE_1__[/* ServerAccordion */ \"a\"], {\n key: data.server.hostname,\n server: data.server,\n workerScripts: data.workerScripts\n });\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: filtered.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_7__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx?"); /***/ }), -/* 1018 */ +/* 1020 */ /*!**************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordion.tsx ***! \**************************************************/ @@ -6714,10 +6716,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1075);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 261);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ServerAccordionContent */ 1019);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 127);\n/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const server = props.server; // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30\n };\n const headerTxt = `${paddedName} ${Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__[/* createProgressBarText */ \"a\"])(barOptions)}`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n style: {\n whiteSpace: \"pre-wrap\"\n }\n }, headerTxt)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n mx: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__[/* ServerAccordionContent */ \"a\"], {\n workerScripts: props.workerScripts\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1078);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./ServerAccordionContent */ 1021);\n/* harmony import */ var _utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../utils/helpers/createProgressBarText */ 128);\n/**\n * React Component for rendering the Accordion element for a single\n * server in the 'Active Scripts' UI page\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction ServerAccordion(props) {\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const server = props.server; // Accordion's header text\n // TODO: calculate the longest hostname length rather than hard coding it\n\n const longestHostnameLength = 18;\n const paddedName = `${server.hostname}${\" \".repeat(longestHostnameLength)}`.slice(0, Math.max(server.hostname.length, longestHostnameLength));\n const barOptions = {\n progress: server.ramUsed / server.maxRam,\n totalTicks: 30\n };\n const headerTxt = `${paddedName} ${Object(_utils_helpers_createProgressBarText__WEBPACK_IMPORTED_MODULE_10__[/* createProgressBarText */ \"a\"])(barOptions)}`;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"], {\n style: {\n whiteSpace: \"pre-wrap\"\n }\n }, headerTxt)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_8___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_7___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], {\n mx: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ServerAccordionContent__WEBPACK_IMPORTED_MODULE_9__[/* ServerAccordionContent */ \"a\"], {\n workerScripts: props.workerScripts\n }))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx?"); /***/ }), -/* 1019 */ +/* 1021 */ /*!*********************************************************!*\ !*** ./src/ui/ActiveScripts/ServerAccordionContent.tsx ***! \*********************************************************/ @@ -6726,10 +6728,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScriptAccordion */ 1020);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 334);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TablePagination */ 1076);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 466);\n\n\n\n\n\nconst pageSize = 20;\nfunction ServerAccordionContent(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n dense: true,\n disablePadding: true\n }, props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(ws => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptAccordion */ \"a\"], {\n key: `${ws.name}_${ws.args}`,\n workerScript: ws\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: props.workerScripts.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ServerAccordionContent; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./WorkerScriptAccordion */ 1022);\n/* harmony import */ var _mui_material_List__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/List */ 336);\n/* harmony import */ var _mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TablePagination */ 1079);\n/* harmony import */ var _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../React/TablePaginationActionsAll */ 467);\n\n\n\n\n\nconst pageSize = 20;\nfunction ServerAccordionContent(props) {\n const [page, setPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [rowsPerPage, setRowsPerPage] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(10);\n\n const handleChangePage = (event, newPage) => {\n setPage(newPage);\n };\n\n const handleChangeRowsPerPage = event => {\n setRowsPerPage(parseInt(event.target.value, 10));\n setPage(0);\n };\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_List__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n dense: true,\n disablePadding: true\n }, props.workerScripts.slice(page * rowsPerPage, page * rowsPerPage + rowsPerPage).map(ws => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_WorkerScriptAccordion__WEBPACK_IMPORTED_MODULE_1__[/* WorkerScriptAccordion */ \"a\"], {\n key: `${ws.name}_${ws.args}`,\n workerScript: ws\n }))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TablePagination__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n rowsPerPageOptions: [10, 15, 20],\n component: \"div\",\n count: props.workerScripts.length,\n rowsPerPage: rowsPerPage,\n page: page,\n onPageChange: handleChangePage,\n onRowsPerPageChange: handleChangeRowsPerPage,\n ActionsComponent: _React_TablePaginationActionsAll__WEBPACK_IMPORTED_MODULE_4__[/* TablePaginationActionsAll */ \"a\"]\n }));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx?"); /***/ }), -/* 1020 */ +/* 1022 */ /*!********************************************************!*\ !*** ./src/ui/ActiveScripts/WorkerScriptAccordion.tsx ***! \********************************************************/ @@ -6738,14 +6740,14 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/IconButton */ 132);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Delete */ 1021);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1075);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 70);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 261);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 102);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../utils/LogBox */ 213);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../utils/helpers/arrayToString */ 217);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../React/MoneyRate */ 122);\n/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])({\n noborder: {\n borderBottom: \"none\"\n }\n});\nfunction WorkerScriptAccordion(props) {\n const classes = useStyles();\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n const logClickHandler = _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__[/* logBoxCreate */ \"a\"].bind(null, scriptRef);\n const killScript = _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__[/* killWorkerScript */ \"a\"].bind(null, scriptRef, scriptRef.server);\n\n function killScriptClickHandler() {\n killScript();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__[/* dialogBoxCreate */ \"a\"])(\"Killing script\");\n } // Calculations for script stats\n\n\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n const offlineMps = scriptRef.offlineMoneyMade / scriptRef.offlineRunningTime;\n const offlineEps = scriptRef.offlineExpGained / scriptRef.offlineRunningTime;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old),\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 \", props.workerScript.name)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n mx: 6\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n padding: \"none\",\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Threads:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatThreads(props.workerScript.scriptRef.threads)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Args: \", Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__[/* arrayToString */ \"a\"])(props.workerScript.args)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.onlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Offline Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.offlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total online production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.onlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.onlineExpGained) + \" hacking exp\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online production rate:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__[/* MoneyRate */ \"a\"], {\n money: onlineMps\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(onlineEps) + \" hacking exp / sec\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total offline production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.offlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.offlineExpGained) + \" hacking exp\"))))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Button__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onClick: logClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"LOG\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: killScriptClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default.a, {\n color: \"error\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return WorkerScriptAccordion; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../numeralFormat */ 3);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/icons-material/Delete */ 1023);\n/* harmony import */ var _mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/ListItemButton */ 1078);\n/* harmony import */ var _mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/ListItemText */ 89);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/ExpandMore */ 72);\n/* harmony import */ var _mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @mui/icons-material/ExpandLess */ 262);\n/* harmony import */ var _mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Netscript/killWorkerScript */ 103);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../utils/LogBox */ 214);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../utils/helpers/arrayToString */ 218);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../React/Money */ 13);\n/* harmony import */ var _React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../React/MoneyRate */ 123);\n/**\n * React Component for displaying a single WorkerScript's info as an\n * Accordion element\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])({\n noborder: {\n borderBottom: \"none\"\n }\n});\nfunction WorkerScriptAccordion(props) {\n const classes = useStyles();\n const [open, setOpen] = react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"](false);\n const workerScript = props.workerScript;\n const scriptRef = workerScript.scriptRef;\n const logClickHandler = _utils_LogBox__WEBPACK_IMPORTED_MODULE_20__[/* logBoxCreate */ \"a\"].bind(null, scriptRef);\n const killScript = _Netscript_killWorkerScript__WEBPACK_IMPORTED_MODULE_18__[/* killWorkerScript */ \"a\"].bind(null, scriptRef, scriptRef.server);\n\n function killScriptClickHandler() {\n killScript();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_19__[/* dialogBoxCreate */ \"a\"])(\"Killing script\");\n } // Calculations for script stats\n\n\n const onlineMps = scriptRef.onlineMoneyMade / scriptRef.onlineRunningTime;\n const onlineEps = scriptRef.onlineExpGained / scriptRef.onlineRunningTime;\n const offlineMps = scriptRef.offlineMoneyMade / scriptRef.offlineRunningTime;\n const offlineEps = scriptRef.offlineExpGained / scriptRef.offlineRunningTime;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: () => setOpen(old => !old),\n component: _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_ListItemText__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n primary: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 \", props.workerScript.name)\n }), open ? react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandLess__WEBPACK_IMPORTED_MODULE_17___default.a, {\n color: \"primary\"\n }) : react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_ExpandMore__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: \"primary\"\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"], {\n in: open,\n timeout: 0,\n unmountOnExit: true\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Box__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], {\n mx: 6\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Table__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"], {\n padding: \"none\",\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Threads:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatThreads(props.workerScript.scriptRef.threads)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 2\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Args: \", Object(_utils_helpers_arrayToString__WEBPACK_IMPORTED_MODULE_22__[/* arrayToString */ \"a\"])(props.workerScript.args)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.onlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Offline Time:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_21__[/* convertTimeMsToTimeElapsedString */ \"b\"])(scriptRef.offlineRunningTime * 1e3)))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total online production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.onlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.onlineExpGained) + \" hacking exp\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Online production rate:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_MoneyRate__WEBPACK_IMPORTED_MODULE_24__[/* MoneyRate */ \"a\"], {\n money: onlineMps\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(onlineEps) + \" hacking exp / sec\"))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\u2514 Total offline production:\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_React_Money__WEBPACK_IMPORTED_MODULE_23__[/* Money */ \"a\"], {\n money: scriptRef.offlineMoneyMade\n })))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n colSpan: 1\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"], {\n className: classes.noborder,\n align: \"left\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"\\xA0\", _numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(scriptRef.offlineExpGained) + \" hacking exp\"))))), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Button__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n onClick: logClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_Typography__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], null, \"LOG\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n onClick: killScriptClickHandler\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_mui_icons_material_Delete__WEBPACK_IMPORTED_MODULE_11___default.a, {\n color: \"error\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx?"); /***/ }), -/* 1021 */, -/* 1022 */, /* 1023 */, /* 1024 */, -/* 1025 */ +/* 1025 */, +/* 1026 */, +/* 1027 */ /*!*****************************************!*\ !*** ./src/Faction/ui/FactionsRoot.tsx ***! \*****************************************/ @@ -6757,7 +6759,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionsRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Factions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Factions */ 22);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n\n\n\nfunction FactionsRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function openFaction(faction) {\n props.router.toFaction(faction);\n }\n\n function acceptInvitation(event, faction) {\n if (!event.isTrusted) return;\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_2__[/* joinFaction */ \"d\"])(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]);\n setRerender(x => !x);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Factions\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Lists all factions you have joined\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factions.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: () => openFaction(_Factions__WEBPACK_IMPORTED_MODULE_1__[/* Factions */ \"a\"][faction]),\n style: {\n padding: \"4px\",\n margin: \"4px\",\n display: \"inline-block\"\n }\n }, faction)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Outstanding Faction Invitations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n width: \"70%\"\n }\n }, \"Lists factions you have been invited to. You can accept these faction invitations at any time.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, props.player.factionInvitations.map(faction => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: faction,\n style: {\n padding: \"6px\",\n margin: \"6px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", {\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, faction), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: \"a-link-button\",\n onClick: e => acceptInvitation(e, faction),\n style: {\n display: \"inline\",\n margin: \"4px\",\n padding: \"4px\"\n }\n }, \"Accept Faction Invitation\")))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionsRoot.tsx?"); /***/ }), -/* 1026 */ +/* 1028 */ /*!****************************************!*\ !*** ./src/Faction/ui/FactionRoot.tsx ***! \****************************************/ @@ -6766,10 +6768,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AugmentationsPage */ 1027);\n/* harmony import */ var _DonateOption__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DonateOption */ 1031);\n/* harmony import */ var _Info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Info */ 1032);\n/* harmony import */ var _Option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Option */ 297);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/SleeveCovenantPurchases */ 292);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateGangPopup */ 1040);\n/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\n\n\n\n\n\n\n\n\n\n\n\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingMissionInfo = \"Attempt a hacking mission for your faction. \" + \"A mission is a mini game that, if won, earns you \" + \"significant reputation with this faction. (Recommended hacking level: 200+)\";\nconst hackingContractsInfo = \"Complete hacking contracts for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your hacking skill. \" + \"You will gain hacking exp.\";\nconst fieldWorkInfo = \"Carry out field missions for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on all of your stats. \" + \"You will gain exp for all stats.\";\nconst securityWorkInfo = \"Serve in a security detail for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your combat stats. \" + \"You will gain exp for all combat stats.\";\nconst augmentationsInfo = \"As your reputation with this faction rises, you will \" + \"unlock Augmentations, which you can purchase to enhance \" + \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\nconst GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\nfunction FactionRoot(props) {\n const faction = props.faction;\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Router();\n const [, setRerenderFlag] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [purchasingAugs, setPurchasingAugs] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function manageGang(faction) {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n const popupId = \"create-gang-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__[/* createPopup */ \"a\"])(popupId, _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__[/* CreateGangPopup */ \"a\"], {\n popupId: popupId,\n facName: faction.name\n });\n }\n\n function rerender() {\n setRerenderFlag(old => !old);\n } // Route to the main faction page\n\n\n function routeToMain() {\n setPurchasingAugs(false);\n } // Route to the purchase augmentation UI for this faction\n\n\n function routeToPurchaseAugs() {\n setPurchasingAugs(true);\n }\n\n function sleevePurchases() {\n Object(_PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__[/* createSleevePurchasesFromCovenantPopup */ \"d\"])(player);\n }\n\n function startFieldWork(faction) {\n player.startFactionFieldWork(faction);\n router.toWork();\n }\n\n function startHackingContracts(faction) {\n player.startFactionHackWork(faction);\n router.toWork();\n }\n\n function startHackingMission(faction) {\n player.singularityStopWork();\n props.startHackingMissionFn(faction);\n }\n\n function startSecurityWork(faction) {\n player.startFactionSecurityWork(faction);\n router.toWork();\n }\n\n function MainPage({\n faction\n }) {\n const p = player;\n const factionInfo = faction.getInfo(); // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name; // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n\n const favorToDonate = Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN >= 10 && _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__[/* SourceFileFlags */ \"a\"][10];\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, faction.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Info__WEBPACK_IMPORTED_MODULE_3__[/* Info */ \"a\"], {\n faction: faction,\n factionInfo: factionInfo\n }), canAccessGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Manage Gang\",\n infoText: gangInfo,\n onClick: () => manageGang(faction)\n }), !isPlayersGang && factionInfo.offerHackingMission && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Mission\",\n infoText: hackingMissionInfo,\n onClick: () => startHackingMission(faction)\n }), !isPlayersGang && factionInfo.offerHackingWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Contracts\",\n infoText: hackingContractsInfo,\n onClick: () => startHackingContracts(faction)\n }), !isPlayersGang && factionInfo.offerFieldWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Field Work\",\n infoText: fieldWorkInfo,\n onClick: () => startFieldWork(faction)\n }), !isPlayersGang && factionInfo.offerSecurityWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Security Work\",\n infoText: securityWorkInfo,\n onClick: () => startSecurityWork(faction)\n }), !isPlayersGang && factionInfo.offersWork() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DonateOption__WEBPACK_IMPORTED_MODULE_2__[/* DonateOption */ \"a\"], {\n faction: faction,\n p: player,\n rerender: rerender,\n favorToDonate: favorToDonate,\n disabled: !canDonate\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase Augmentations\",\n infoText: augmentationsInfo,\n onClick: routeToPurchaseAugs\n }), canPurchaseSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase & Upgrade Duplicate Sleeves\",\n infoText: sleevePurchasesInfo,\n onClick: sleevePurchases\n }));\n }\n\n return purchasingAugs ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationsPage */ \"a\"], {\n faction: faction,\n routeToMainPage: routeToMain\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MainPage, {\n faction: faction\n });\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return FactionRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AugmentationsPage */ 1029);\n/* harmony import */ var _DonateOption__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./DonateOption */ 1033);\n/* harmony import */ var _Info__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Info */ 1034);\n/* harmony import */ var _Option__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Option */ 298);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../PersonObjects/Sleeve/SleeveCovenantPurchases */ 293);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./CreateGangPopup */ 1042);\n/**\n * Root React Component for displaying a Faction's UI.\n * This is the component for displaying a single faction's UI, not the list of all\n * accessible factions\n */\n\n\n\n\n\n\n\n\n\n\n\n\n// Info text for all options on the UI\nconst gangInfo = \"Create and manage a gang for this Faction. Gangs will earn you money and \" + \"faction reputation\";\nconst hackingMissionInfo = \"Attempt a hacking mission for your faction. \" + \"A mission is a mini game that, if won, earns you \" + \"significant reputation with this faction. (Recommended hacking level: 200+)\";\nconst hackingContractsInfo = \"Complete hacking contracts for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your hacking skill. \" + \"You will gain hacking exp.\";\nconst fieldWorkInfo = \"Carry out field missions for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on all of your stats. \" + \"You will gain exp for all stats.\";\nconst securityWorkInfo = \"Serve in a security detail for your faction. \" + \"Your effectiveness, which determines how much \" + \"reputation you gain for this faction, is based on your combat stats. \" + \"You will gain exp for all combat stats.\";\nconst augmentationsInfo = \"As your reputation with this faction rises, you will \" + \"unlock Augmentations, which you can purchase to enhance \" + \"your abilities.\";\nconst sleevePurchasesInfo = \"Purchase Duplicate Sleeves and upgrades. These are permanent!\";\nconst GangNames = [\"Slum Snakes\", \"Tetrads\", \"The Syndicate\", \"The Dark Army\", \"Speakers for the Dead\", \"NiteSec\", \"The Black Hand\"];\nfunction FactionRoot(props) {\n const faction = props.faction;\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_10__[/* use */ \"b\"].Router();\n const [, setRerenderFlag] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n const [purchasingAugs, setPurchasingAugs] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function manageGang(faction) {\n // If player already has a gang, just go to the gang UI\n if (player.inGang()) {\n return router.toGang();\n }\n\n const popupId = \"create-gang-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_9__[/* createPopup */ \"a\"])(popupId, _CreateGangPopup__WEBPACK_IMPORTED_MODULE_11__[/* CreateGangPopup */ \"a\"], {\n popupId: popupId,\n facName: faction.name\n });\n }\n\n function rerender() {\n setRerenderFlag(old => !old);\n } // Route to the main faction page\n\n\n function routeToMain() {\n setPurchasingAugs(false);\n } // Route to the purchase augmentation UI for this faction\n\n\n function routeToPurchaseAugs() {\n setPurchasingAugs(true);\n }\n\n function sleevePurchases() {\n Object(_PersonObjects_Sleeve_SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_7__[/* createSleevePurchasesFromCovenantPopup */ \"d\"])(player);\n }\n\n function startFieldWork(faction) {\n player.startFactionFieldWork(faction);\n router.toWork();\n }\n\n function startHackingContracts(faction) {\n player.startFactionHackWork(faction);\n router.toWork();\n }\n\n function startHackingMission(faction) {\n player.singularityStopWork();\n props.startHackingMissionFn(faction);\n }\n\n function startSecurityWork(faction) {\n player.startFactionSecurityWork(faction);\n router.toWork();\n }\n\n function MainPage({\n faction\n }) {\n const p = player;\n const factionInfo = faction.getInfo(); // We have a special flag for whether the player this faction is the player's\n // gang faction because if the player has a gang, they cannot do any other action\n\n const isPlayersGang = p.inGang() && p.getGangName() === faction.name; // Flags for whether special options (gang, sleeve purchases, donate, etc.)\n // should be shown\n\n const favorToDonate = Math.floor(_Constants__WEBPACK_IMPORTED_MODULE_5__[/* CONSTANTS */ \"a\"].BaseFavorToDonate * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_6__[/* BitNodeMultipliers */ \"a\"].RepToDonateToFaction);\n const canDonate = faction.favor >= favorToDonate;\n const canPurchaseSleeves = faction.name === \"The Covenant\" && p.bitNodeN >= 10 && _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_8__[/* SourceFileFlags */ \"a\"][10];\n let canAccessGang = p.canAccessGang() && GangNames.includes(faction.name);\n\n if (p.inGang()) {\n if (p.getGangName() !== faction.name) {\n canAccessGang = false;\n } else if (p.getGangName() === faction.name) {\n canAccessGang = true;\n }\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, faction.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Info__WEBPACK_IMPORTED_MODULE_3__[/* Info */ \"a\"], {\n faction: faction,\n factionInfo: factionInfo\n }), canAccessGang && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Manage Gang\",\n infoText: gangInfo,\n onClick: () => manageGang(faction)\n }), !isPlayersGang && factionInfo.offerHackingMission && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Mission\",\n infoText: hackingMissionInfo,\n onClick: () => startHackingMission(faction)\n }), !isPlayersGang && factionInfo.offerHackingWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Hacking Contracts\",\n infoText: hackingContractsInfo,\n onClick: () => startHackingContracts(faction)\n }), !isPlayersGang && factionInfo.offerFieldWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Field Work\",\n infoText: fieldWorkInfo,\n onClick: () => startFieldWork(faction)\n }), !isPlayersGang && factionInfo.offerSecurityWork && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Security Work\",\n infoText: securityWorkInfo,\n onClick: () => startSecurityWork(faction)\n }), !isPlayersGang && factionInfo.offersWork() && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DonateOption__WEBPACK_IMPORTED_MODULE_2__[/* DonateOption */ \"a\"], {\n faction: faction,\n p: player,\n rerender: rerender,\n favorToDonate: favorToDonate,\n disabled: !canDonate\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase Augmentations\",\n infoText: augmentationsInfo,\n onClick: routeToPurchaseAugs\n }), canPurchaseSleeves && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_Option__WEBPACK_IMPORTED_MODULE_4__[/* Option */ \"a\"], {\n buttonText: \"Purchase & Upgrade Duplicate Sleeves\",\n infoText: sleevePurchasesInfo,\n onClick: sleevePurchases\n }));\n }\n\n return purchasingAugs ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_AugmentationsPage__WEBPACK_IMPORTED_MODULE_1__[/* AugmentationsPage */ \"a\"], {\n faction: faction,\n routeToMainPage: routeToMain\n }) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MainPage, {\n faction: faction\n });\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/FactionRoot.tsx?"); /***/ }), -/* 1027 */ +/* 1029 */ /*!**********************************************!*\ !*** ./src/Faction/ui/AugmentationsPage.tsx ***! \**********************************************/ @@ -6778,10 +6780,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PurchaseableAugmentation */ 1028);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * Root React Component for displaying a faction's \"Purchase Augmentations\" page\n */\n\n\n\n\n\n\n\n\nfunction AugmentationsPage(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player(); // Flag for whether the player has a gang with this faction\n\n const isPlayersGang = player.inGang() && player.getGangName() === props.faction.name;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function getAugs() {\n if (isPlayersGang) {\n const augs = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n augs.push(augName);\n }\n }\n\n return augs;\n } else {\n return props.faction.augmentations.slice();\n }\n }\n\n function getAugsSorted() {\n switch (_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder) {\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost:\n {\n return getAugsSortedByCost();\n }\n\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation:\n {\n return getAugsSortedByReputation();\n }\n\n default:\n return getAugsSortedByDefault();\n }\n }\n\n function getAugsSortedByCost() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseCost - aug2.baseCost;\n });\n return augs;\n }\n\n function getAugsSortedByReputation() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseRepRequirement - aug2.baseRepRequirement;\n });\n return augs;\n }\n\n function getAugsSortedByDefault() {\n return getAugs();\n }\n\n function switchSortOrder(newOrder) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder = newOrder;\n rerender();\n }\n\n const augs = getAugsSorted();\n const purchasable = augs.filter(aug => aug === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor || !player.augmentations.some(a => a.name === aug) && !player.queuedAugmentations.some(a => a.name === aug));\n\n const purchaseableAugmentation = aug => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseableAugmentation */ \"a\"], {\n augName: aug,\n faction: props.faction,\n key: aug,\n p: player,\n rerender: rerender\n });\n };\n\n const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));\n let ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const owned = augs.filter(aug => !purchasable.includes(aug));\n\n if (owned.length !== 0) {\n ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This factions also offers these augmentations but you already own them.\"), owned.map(aug => purchaseableAugmentation(aug)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: props.routeToMainPage,\n text: \"Back\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Faction Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These are all of the Augmentations that are available to purchase from \", props.faction.name, \". Augmentations are powerful upgrades that will enhance your abilities.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost),\n text: \"Sort by Cost\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation),\n text: \"Sort by Reputation\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default),\n text: \"Sort by Default Order\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), augListElems, ownedElem, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/AugmentationsPage.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AugmentationsPage; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PurchaseableAugmentation */ 1030);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Settings/SettingEnums */ 152);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * Root React Component for displaying a faction's \"Purchase Augmentations\" page\n */\n\n\n\n\n\n\n\n\nfunction AugmentationsPage(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player(); // Flag for whether the player has a gang with this faction\n\n const isPlayersGang = player.inGang() && player.getGangName() === props.faction.name;\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n function getAugs() {\n if (isPlayersGang) {\n const augs = [];\n\n for (const augName in _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"]) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName];\n\n if (!aug.isSpecial) {\n augs.push(augName);\n }\n }\n\n return augs;\n } else {\n return props.faction.augmentations.slice();\n }\n }\n\n function getAugsSorted() {\n switch (_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder) {\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost:\n {\n return getAugsSortedByCost();\n }\n\n case _Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation:\n {\n return getAugsSortedByReputation();\n }\n\n default:\n return getAugsSortedByDefault();\n }\n }\n\n function getAugsSortedByCost() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseCost - aug2.baseCost;\n });\n return augs;\n }\n\n function getAugsSortedByReputation() {\n const augs = getAugs();\n augs.sort((augName1, augName2) => {\n const aug1 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName1],\n aug2 = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_2__[/* Augmentations */ \"a\"][augName2];\n\n if (aug1 == null || aug2 == null) {\n throw new Error(\"Invalid Augmentation Names\");\n }\n\n return aug1.baseRepRequirement - aug2.baseRepRequirement;\n });\n return augs;\n }\n\n function getAugsSortedByDefault() {\n return getAugs();\n }\n\n function switchSortOrder(newOrder) {\n _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].PurchaseAugmentationsOrder = newOrder;\n rerender();\n }\n\n const augs = getAugsSorted();\n const purchasable = augs.filter(aug => aug === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_3__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor || !player.augmentations.some(a => a.name === aug) && !player.queuedAugmentations.some(a => a.name === aug));\n\n const purchaseableAugmentation = aug => {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseableAugmentation__WEBPACK_IMPORTED_MODULE_1__[/* PurchaseableAugmentation */ \"a\"], {\n augName: aug,\n faction: props.faction,\n key: aug,\n p: player,\n rerender: rerender\n });\n };\n\n const augListElems = purchasable.map(aug => purchaseableAugmentation(aug));\n let ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const owned = augs.filter(aug => !purchasable.includes(aug));\n\n if (owned.length !== 0) {\n ownedElem = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, \"Purchased Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This factions also offers these augmentations but you already own them.\"), owned.map(aug => purchaseableAugmentation(aug)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: props.routeToMainPage,\n text: \"Back\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"Faction Augmentations\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These are all of the Augmentations that are available to purchase from \", props.faction.name, \". Augmentations are powerful upgrades that will enhance your abilities.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Cost),\n text: \"Sort by Cost\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Reputation),\n text: \"Sort by Reputation\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_6__[/* StdButton */ \"a\"], {\n onClick: () => switchSortOrder(_Settings_SettingEnums__WEBPACK_IMPORTED_MODULE_4__[/* PurchaseAugmentationsOrderSetting */ \"b\"].Default),\n text: \"Sort by Default Order\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), augListElems, ownedElem, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/AugmentationsPage.tsx?"); /***/ }), -/* 1028 */ +/* 1030 */ /*!*****************************************************!*\ !*** ./src/Faction/ui/PurchaseableAugmentation.tsx ***! \*****************************************************/ @@ -6790,10 +6792,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseableAugmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PurchaseAugmentationPopup */ 1029);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/Augmentation */ 1030);\n/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction PurchaseableAugmentation(props) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][props.augName];\n if (aug == null) throw new Error(`aug ${props.augName} does not exists`);\n\n function getMoneyCost() {\n return aug.baseCost * props.faction.getInfo().augmentationPriceMult;\n }\n\n function getRepCost() {\n return aug.baseRepRequirement * props.faction.getInfo().augmentationRepRequirementMult;\n }\n\n function handleClick() {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n const popupId = \"purchase-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__[/* PurchaseAugmentationPopup */ \"a\"], {\n aug: aug,\n faction: props.faction,\n player: props.p,\n rerender: props.rerender,\n popupId: popupId\n });\n } else {\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(aug, props.faction);\n props.rerender();\n }\n } // Whether the player has the prerequisite Augmentations\n\n\n function hasPrereqs() {\n return Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasAugmentationPrereqs */ \"b\"])(aug);\n } // Whether the player has enough rep for this Augmentation\n\n\n function hasReputation() {\n return props.faction.playerReputation >= getRepCost();\n } // Whether the player has this augmentations (purchased OR installed)\n\n\n function owned() {\n let owned = false;\n\n for (const queuedAug of props.p.queuedAugmentations) {\n if (queuedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n for (const installedAug of props.p.augmentations) {\n if (installedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n return owned;\n }\n\n if (aug == null) {\n console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${props.augName}`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n const moneyCost = getMoneyCost();\n const repCost = getRepCost(); // Determine UI properties\n\n let disabled = false;\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let color = \"\";\n\n if (!hasPrereqs()) {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", aug.prereqs.map(aug => Object(_ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__[/* Augmentation */ \"a\"])(aug)), \" as prerequisite)\");\n color = \"red\";\n } else if (aug.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && (aug.owned || owned())) {\n disabled = true;\n } else if (hasReputation()) {\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"UNLOCKED (at \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation) - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }));\n } else {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }), \")\");\n color = \"red\";\n }\n\n const txtStyle = {\n display: \"inline-block\"\n };\n\n if (color !== \"\") {\n txtStyle.color = color;\n } // Determine button txt\n\n\n let btnTxt = aug.name;\n\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n btnTxt += ` - Level ${Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getNextNeurofluxLevel */ \"a\"])()}`;\n }\n\n let tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n if (typeof aug.info === \"string\") tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);else tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: aug.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n style: {\n margin: \"4px\",\n padding: \"4px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__[/* StdButton */ \"a\"], {\n disabled: disabled,\n onClick: handleClick,\n style: {\n display: \"inline-block\"\n },\n text: btnTxt,\n tooltip: tooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: txtStyle\n }, status)));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseableAugmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PurchaseAugmentationPopup */ 1031);\n/* harmony import */ var _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../Augmentation/Augmentations */ 20);\n/* harmony import */ var _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../Augmentation/data/AugmentationNames */ 6);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/React/Augmentation */ 1032);\n/**\n * React component for displaying a single augmentation for purchase through\n * the faction UI\n */\n\n\n\n\n\n\n\n\n\n\n\nfunction PurchaseableAugmentation(props) {\n const aug = _Augmentation_Augmentations__WEBPACK_IMPORTED_MODULE_3__[/* Augmentations */ \"a\"][props.augName];\n if (aug == null) throw new Error(`aug ${props.augName} does not exists`);\n\n function getMoneyCost() {\n return aug.baseCost * props.faction.getInfo().augmentationPriceMult;\n }\n\n function getRepCost() {\n return aug.baseRepRequirement * props.faction.getInfo().augmentationRepRequirementMult;\n }\n\n function handleClick() {\n if (!_Settings_Settings__WEBPACK_IMPORTED_MODULE_5__[/* Settings */ \"a\"].SuppressBuyAugmentationConfirmation) {\n const popupId = \"purchase-augmentation-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_8__[/* createPopup */ \"a\"])(popupId, _PurchaseAugmentationPopup__WEBPACK_IMPORTED_MODULE_2__[/* PurchaseAugmentationPopup */ \"a\"], {\n aug: aug,\n faction: props.faction,\n player: props.p,\n rerender: props.rerender,\n popupId: popupId\n });\n } else {\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(aug, props.faction);\n props.rerender();\n }\n } // Whether the player has the prerequisite Augmentations\n\n\n function hasPrereqs() {\n return Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* hasAugmentationPrereqs */ \"b\"])(aug);\n } // Whether the player has enough rep for this Augmentation\n\n\n function hasReputation() {\n return props.faction.playerReputation >= getRepCost();\n } // Whether the player has this augmentations (purchased OR installed)\n\n\n function owned() {\n let owned = false;\n\n for (const queuedAug of props.p.queuedAugmentations) {\n if (queuedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n for (const installedAug of props.p.augmentations) {\n if (installedAug.name === props.augName) {\n owned = true;\n break;\n }\n }\n\n return owned;\n }\n\n if (aug == null) {\n console.error(`Invalid Augmentation when trying to create PurchaseableAugmentation display element: ${props.augName}`);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n }\n\n const moneyCost = getMoneyCost();\n const repCost = getRepCost(); // Determine UI properties\n\n let disabled = false;\n let status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n let color = \"\";\n\n if (!hasPrereqs()) {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", aug.prereqs.map(aug => Object(_ui_React_Augmentation__WEBPACK_IMPORTED_MODULE_10__[/* Augmentation */ \"a\"])(aug)), \" as prerequisite)\");\n color = \"red\";\n } else if (aug.name !== _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor && (aug.owned || owned())) {\n disabled = true;\n } else if (hasReputation()) {\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"UNLOCKED (at \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation) - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }));\n } else {\n disabled = true;\n status = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"LOCKED (Requires \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_7__[/* Reputation */ \"a\"])(repCost), \" faction reputation - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: moneyCost,\n player: props.p\n }), \")\");\n color = \"red\";\n }\n\n const txtStyle = {\n display: \"inline-block\"\n };\n\n if (color !== \"\") {\n txtStyle.color = color;\n } // Determine button txt\n\n\n let btnTxt = aug.name;\n\n if (aug.name === _Augmentation_data_AugmentationNames__WEBPACK_IMPORTED_MODULE_4__[/* AugmentationNames */ \"a\"].NeuroFluxGovernor) {\n btnTxt += ` - Level ${Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* getNextNeurofluxLevel */ \"a\"])()}`;\n }\n\n let tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n if (typeof aug.info === \"string\") tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n dangerouslySetInnerHTML: {\n __html: aug.info\n }\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);else tooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, aug.info, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), aug.stats);\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", {\n key: aug.name\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n style: {\n margin: \"4px\",\n padding: \"4px\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_9__[/* StdButton */ \"a\"], {\n disabled: disabled,\n onClick: handleClick,\n style: {\n display: \"inline-block\"\n },\n text: btnTxt,\n tooltip: tooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: txtStyle\n }, status)));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx?"); /***/ }), -/* 1029 */ +/* 1031 */ /*!******************************************************!*\ !*** ./src/Faction/ui/PurchaseAugmentationPopup.tsx ***! \******************************************************/ @@ -6802,10 +6804,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseAugmentationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 117);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\n\nfunction PurchaseAugmentationPopup(props) {\n const factionInfo = props.faction.getInfo();\n\n function buy() {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isRepeatableAug */ \"e\"])(props.aug) && props.player.hasAugmentation(props.aug)) {\n return;\n }\n\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(props.aug, props.faction);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, props.aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.stats, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Would you like to purchase the \", props.aug.name, \" Augmentation for\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.aug.baseCost * factionInfo.augmentationPriceMult\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: buy\n }, \"Purchase\"));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseAugmentationPopup.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PurchaseAugmentationPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _FactionHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../FactionHelpers */ 91);\n/* harmony import */ var _Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Augmentation/AugmentationHelpers */ 118);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\n\n\nfunction PurchaseAugmentationPopup(props) {\n const factionInfo = props.faction.getInfo();\n\n function buy() {\n if (!Object(_Augmentation_AugmentationHelpers__WEBPACK_IMPORTED_MODULE_2__[/* isRepeatableAug */ \"e\"])(props.aug) && props.player.hasAugmentation(props.aug)) {\n return;\n }\n\n Object(_FactionHelpers__WEBPACK_IMPORTED_MODULE_1__[/* purchaseAugmentation */ \"f\"])(props.aug, props.faction);\n props.rerender();\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_4__[/* removePopup */ \"b\"])(props.popupId);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h2\", null, props.aug.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), props.aug.stats, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Would you like to purchase the \", props.aug.name, \" Augmentation for\\xA0\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: props.aug.baseCost * factionInfo.augmentationPriceMult\n }), \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n autoFocus: true,\n className: \"std-button\",\n onClick: buy\n }, \"Purchase\"));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/PurchaseAugmentationPopup.tsx?"); /***/ }), -/* 1030 */ +/* 1032 */ /*!***************************************!*\ !*** ./src/ui/React/Augmentation.tsx ***! \***************************************/ @@ -6817,7 +6819,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Augmentation; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\nfunction Augmentation(name) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"samefont\",\n style: {\n color: \"white\"\n }\n }, name);\n}\n\n//# sourceURL=webpack:///./src/ui/React/Augmentation.tsx?"); /***/ }), -/* 1031 */ +/* 1033 */ /*!*****************************************!*\ !*** ./src/Faction/ui/DonateOption.tsx ***! \*****************************************/ @@ -6826,10 +6828,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DonateOption; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _formulas_donation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formulas/donation */ 572);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mathjax-react */ 195);\n/**\n * React component for a donate option on the Faction UI\n */\n\n\n\n\n\n\n\n\n\nconst inputStyleMarkup = {\n margin: \"5px\",\n height: \"26px\"\n};\nfunction DonateOption(props) {\n const [donateAmt, setDonateAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const digits = (_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor + \"\").length - 1;\n\n function canDonate() {\n if (donateAmt === null) return false;\n if (isNaN(donateAmt) || donateAmt <= 0) return false;\n if (props.p.money.lt(donateAmt)) return false;\n return true;\n }\n\n function onChange(event) {\n const amt = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__[/* numeralWrapper */ \"a\"].parseMoney(event.target.value);\n if (event.target.value === \"\" || isNaN(amt)) setDonateAmt(null);else setDonateAmt(amt);\n }\n\n function donate() {\n const fac = props.faction;\n const amt = donateAmt;\n if (amt === null) return;\n if (!canDonate()) return;\n props.p.loseMoney(amt);\n const repGain = Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(amt, props.p);\n props.faction.playerReputation += repGain;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You just donated \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: amt\n }), \" to \", fac.name, \" to gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(repGain), \" reputation.\"));\n props.rerender();\n }\n\n function Status() {\n if (donateAmt === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (!canDonate()) {\n if (props.p.money.lt(donateAmt)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Insufficient funds\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid donate amount entered!\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This donation will result in \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(donateAmt, props.p)), \" reputation gain\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onChange,\n placeholder: \"Donation amount\",\n style: inputStyleMarkup,\n disabled: props.disabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: donate,\n text: \"Donate Money\",\n disabled: props.disabled || !canDonate()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Status, null), props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Unlocked at \", props.favorToDonate, \" favor with \", props.faction.name) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_8__[/* MathComponent */ \"a\"], {\n tex: String.raw`reputation = \\frac{\\text{donation amount} \\times \\text{reputation multiplier}}{10^{${digits}}}`\n }))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/DonateOption.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return DonateOption; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _formulas_donation__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../formulas/donation */ 572);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! mathjax-react */ 196);\n/**\n * React component for a donate option on the Faction UI\n */\n\n\n\n\n\n\n\n\n\nconst inputStyleMarkup = {\n margin: \"5px\",\n height: \"26px\"\n};\nfunction DonateOption(props) {\n const [donateAmt, setDonateAmt] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(null);\n const digits = (_Constants__WEBPACK_IMPORTED_MODULE_1__[/* CONSTANTS */ \"a\"].DonateMoneyToRepDivisor + \"\").length - 1;\n\n function canDonate() {\n if (donateAmt === null) return false;\n if (isNaN(donateAmt) || donateAmt <= 0) return false;\n if (props.p.money.lt(donateAmt)) return false;\n return true;\n }\n\n function onChange(event) {\n const amt = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__[/* numeralWrapper */ \"a\"].parseMoney(event.target.value);\n if (event.target.value === \"\" || isNaN(amt)) setDonateAmt(null);else setDonateAmt(amt);\n }\n\n function donate() {\n const fac = props.faction;\n const amt = donateAmt;\n if (amt === null) return;\n if (!canDonate()) return;\n props.p.loseMoney(amt);\n const repGain = Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(amt, props.p);\n props.faction.playerReputation += repGain;\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"You just donated \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: amt\n }), \" to \", fac.name, \" to gain \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(repGain), \" reputation.\"));\n props.rerender();\n }\n\n function Status() {\n if (donateAmt === null) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n\n if (!canDonate()) {\n if (props.p.money.lt(donateAmt)) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Insufficient funds\");\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Invalid donate amount entered!\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"This donation will result in \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_4__[/* Reputation */ \"a\"])(Object(_formulas_donation__WEBPACK_IMPORTED_MODULE_2__[/* repFromDonation */ \"a\"])(donateAmt, props.p)), \" reputation gain\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"faction-work-div-wrapper\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"input\", {\n className: \"text-input\",\n onChange: onChange,\n placeholder: \"Donation amount\",\n style: inputStyleMarkup,\n disabled: props.disabled\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n onClick: donate,\n text: \"Donate Money\",\n disabled: props.disabled || !canDonate()\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Status, null), props.disabled ? react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Unlocked at \", props.favorToDonate, \" favor with \", props.faction.name) : react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"text\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(mathjax_react__WEBPACK_IMPORTED_MODULE_8__[/* MathComponent */ \"a\"], {\n tex: String.raw`reputation = \\frac{\\text{donation amount} \\times \\text{reputation multiplier}}{10^{${digits}}}`\n }))));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/DonateOption.tsx?"); /***/ }), -/* 1032 */ +/* 1034 */ /*!*********************************!*\ !*** ./src/Faction/ui/Info.tsx ***! \*********************************/ @@ -6838,10 +6840,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Info; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/AutoupdatingParagraph */ 1033);\n/* harmony import */ var _ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ParagraphWithTooltip */ 1034);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Favor */ 358);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mathjax-react */ 195);\n/**\n * React component for general information about the faction. This includes the\n * factions \"motto\", reputation, favor, and gameplay instructions\n */\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nconst infoStyleMarkup = {\n display: \"block\",\n width: \"70%\"\n};\nclass Info extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getFavorGainContent = this.getFavorGainContent.bind(this);\n this.getReputationContent = this.getReputationContent.bind(this);\n }\n\n getFavorGainContent() {\n const favorGain = this.props.faction.getFavorGain()[0];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You will have \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor + favorGain), \" faction favor after installing an Augmentation.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = \\text{total faction reputation}}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{favor=\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}`\n }));\n }\n\n getReputationContent() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(this.props.faction.playerReputation));\n }\n\n render() {\n const favorTooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = reputation}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}`\n }));\n const infoText = {\n __html: this.props.factionInfo.infoText\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", {\n className: \"text\",\n dangerouslySetInnerHTML: infoText\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__[/* AutoupdatingParagraph */ \"a\"], {\n intervalTime: 5e3,\n getContent: this.getReputationContent,\n getTooltip: this.getFavorGainContent\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__[/* ParagraphWithTooltip */ \"a\"], {\n content: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor)),\n tooltip: favorTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: infoStyleMarkup\n }, \"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities.\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Info.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return Info; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/AutoupdatingParagraph */ 1035);\n/* harmony import */ var _ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/ParagraphWithTooltip */ 1036);\n/* harmony import */ var _ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Reputation */ 76);\n/* harmony import */ var _ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/Favor */ 360);\n/* harmony import */ var mathjax_react__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! mathjax-react */ 196);\n/**\n * React component for general information about the faction. This includes the\n * factions \"motto\", reputation, favor, and gameplay instructions\n */\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nconst infoStyleMarkup = {\n display: \"block\",\n width: \"70%\"\n};\nclass Info extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.getFavorGainContent = this.getFavorGainContent.bind(this);\n this.getReputationContent = this.getReputationContent.bind(this);\n }\n\n getFavorGainContent() {\n const favorGain = this.props.faction.getFavorGain()[0];\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You will have \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor + favorGain), \" faction favor after installing an Augmentation.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = \\text{total faction reputation}}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{favor=\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}`\n }));\n }\n\n getReputationContent() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Reputation: \", Object(_ui_React_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(this.props.faction.playerReputation));\n }\n\n render() {\n const favorTooltip = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you install an Augmentation. The amount of favor you gain depends on the total amount of reputation you earned with this faction. Across all resets.\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{r = reputation}`\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](mathjax_react__WEBPACK_IMPORTED_MODULE_5__[/* MathComponent */ \"a\"], {\n tex: String.raw`\\large{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}`\n }));\n const infoText = {\n __html: this.props.factionInfo.infoText\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"i\", {\n className: \"text\",\n dangerouslySetInnerHTML: infoText\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_AutoupdatingParagraph__WEBPACK_IMPORTED_MODULE_1__[/* AutoupdatingParagraph */ \"a\"], {\n intervalTime: 5e3,\n getContent: this.getReputationContent,\n getTooltip: this.getFavorGainContent\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ParagraphWithTooltip__WEBPACK_IMPORTED_MODULE_2__[/* ParagraphWithTooltip */ \"a\"], {\n content: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Faction Favor: \", Object(_ui_React_Favor__WEBPACK_IMPORTED_MODULE_4__[/* Favor */ \"a\"])(this.props.faction.favor)),\n tooltip: favorTooltip\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"-------------------------\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: infoStyleMarkup\n }, \"Perform work/carry out assignments for your faction to help further its cause! By doing so you will earn reputation for your faction. You will also gain reputation passively over time, although at a very slow rate. Earning reputation will allow you to purchase Augmentations through this faction, which are powerful upgrades that enhance your abilities.\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/Info.tsx?"); /***/ }), -/* 1033 */ +/* 1035 */ /*!************************************************!*\ !*** ./src/ui/React/AutoupdatingParagraph.tsx ***! \************************************************/ @@ -6853,7 +6855,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return AutoupdatingParagraph; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n/**\n * Basic paragraph (p Element) that automatically re-renders itself every X seconds\n *\n * NOT recommended for usage - only if you really have to\n */\n\nclass AutoupdatingParagraph extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n /**\n * Timer ID for auto-updating implementation (returned value from setInterval())\n */\n constructor(props) {\n super(props);\n\n _defineProperty(this, \"interval\", 0);\n\n this.state = {\n i: 0\n };\n }\n\n componentDidMount() {\n const time = this.props.intervalTime ? this.props.intervalTime : 1000;\n this.interval = window.setInterval(() => this.tick(), time);\n }\n\n componentWillUnmount() {\n clearInterval(this.interval);\n }\n\n tick() {\n this.setState(prevState => ({\n i: prevState.i + 1\n }));\n }\n\n hasTooltip() {\n if (this.props.getTooltip != null) {\n return !!this.props.getTooltip();\n }\n\n return true;\n }\n\n tooltip() {\n if (!this.props.getTooltip) return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null);\n return this.props.getTooltip();\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.getContent()), this.hasTooltip() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.tooltip()));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/AutoupdatingParagraph.tsx?"); /***/ }), -/* 1034 */ +/* 1036 */ /*!***********************************************!*\ !*** ./src/ui/React/ParagraphWithTooltip.tsx ***! \***********************************************/ @@ -6865,7 +6867,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ParagraphWithTooltip; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/**\n * Text (p Element) with Tooltip\n */\n\nclass ParagraphWithTooltip extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"tooltip\",\n style: this.props.style\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, this.props.content), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, this.props.tooltip));\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ParagraphWithTooltip.tsx?"); /***/ }), -/* 1035 */ +/* 1037 */ /*!***************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx ***! \***************************************************************/ @@ -6874,10 +6876,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantPurchasesRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveUpgrades */ 1036);\n/* harmony import */ var _Sleeve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sleeve */ 246);\n/* harmony import */ var _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SleeveCovenantPurchases */ 292);\n/* harmony import */ var _ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/PopupCloseButton */ 1038);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Root React component for the popup that lets player purchase Duplicate\n * Sleeves and Sleeve-related upgrades from The Covenant\n */\n\n\n\n\n\n\n\n\nfunction CovenantPurchasesRoot(props) {\n const [update, setUpdate] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n /**\n * Get the cost to purchase a new Duplicate Sleeve\n */\n\n function purchaseCost() {\n return (props.p.sleevesFromCovenant + 1) * _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* BaseCostPerSleeve */ \"a\"];\n }\n /**\n * Force a rerender by just changing an arbitrary state value\n */\n\n\n function rerender() {\n setUpdate(update + 1);\n } // Purchasing a new Duplicate Sleeve\n\n\n let purchaseDisabled = false;\n\n if (!props.p.canAfford(purchaseCost())) {\n purchaseDisabled = true;\n }\n\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) {\n purchaseDisabled = true;\n }\n\n function purchaseOnClick() {\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) return;\n\n if (props.p.canAfford(purchaseCost())) {\n props.p.loseMoney(purchaseCost());\n props.p.sleevesFromCovenant += 1;\n props.p.sleeves.push(new _Sleeve__WEBPACK_IMPORTED_MODULE_2__[/* Sleeve */ \"a\"](props.p));\n rerender();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to purchase a Duplicate Sleeve`, false);\n }\n } // Purchasing Upgrades for Sleeves\n\n\n const upgradePanels = [];\n\n for (let i = 0; i < props.p.sleeves.length; ++i) {\n const sleeve = props.p.sleeves[i];\n upgradePanels.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveUpgrades */ \"a\"], _extends({}, props, {\n sleeve: sleeve,\n index: i,\n rerender: rerender,\n key: i\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__[/* PopupCloseButton */ \"a\"], {\n popup: _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* PopupId */ \"c\"],\n text: \"Close\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to purchase an additional Duplicate Sleeve from The Covenant for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: purchaseCost(),\n player: props.p\n }), \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of\", \" \", _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"], \" from The Covenant.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n disabled: purchaseDisabled,\n onClick: purchaseOnClick,\n text: \"Purchase\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes.\"), upgradePanels);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantPurchasesRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveUpgrades */ 1038);\n/* harmony import */ var _Sleeve__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../Sleeve */ 246);\n/* harmony import */ var _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../SleeveCovenantPurchases */ 293);\n/* harmony import */ var _ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../ui/React/PopupCloseButton */ 1040);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../utils/DialogBox */ 10);\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\n/**\n * Root React component for the popup that lets player purchase Duplicate\n * Sleeves and Sleeve-related upgrades from The Covenant\n */\n\n\n\n\n\n\n\n\nfunction CovenantPurchasesRoot(props) {\n const [update, setUpdate] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n /**\n * Get the cost to purchase a new Duplicate Sleeve\n */\n\n function purchaseCost() {\n return (props.p.sleevesFromCovenant + 1) * _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* BaseCostPerSleeve */ \"a\"];\n }\n /**\n * Force a rerender by just changing an arbitrary state value\n */\n\n\n function rerender() {\n setUpdate(update + 1);\n } // Purchasing a new Duplicate Sleeve\n\n\n let purchaseDisabled = false;\n\n if (!props.p.canAfford(purchaseCost())) {\n purchaseDisabled = true;\n }\n\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) {\n purchaseDisabled = true;\n }\n\n function purchaseOnClick() {\n if (props.p.sleevesFromCovenant >= _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"]) return;\n\n if (props.p.canAfford(purchaseCost())) {\n props.p.loseMoney(purchaseCost());\n props.p.sleevesFromCovenant += 1;\n props.p.sleeves.push(new _Sleeve__WEBPACK_IMPORTED_MODULE_2__[/* Sleeve */ \"a\"](props.p));\n rerender();\n } else {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_7__[/* dialogBoxCreate */ \"a\"])(`You cannot afford to purchase a Duplicate Sleeve`, false);\n }\n } // Purchasing Upgrades for Sleeves\n\n\n const upgradePanels = [];\n\n for (let i = 0; i < props.p.sleeves.length; ++i) {\n const sleeve = props.p.sleeves[i];\n upgradePanels.push(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_CovenantSleeveUpgrades__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveUpgrades */ \"a\"], _extends({}, props, {\n sleeve: sleeve,\n index: i,\n rerender: rerender,\n key: i\n })));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_PopupCloseButton__WEBPACK_IMPORTED_MODULE_4__[/* PopupCloseButton */ \"a\"], {\n popup: _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* PopupId */ \"c\"],\n text: \"Close\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Would you like to purchase an additional Duplicate Sleeve from The Covenant for\", \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_Money__WEBPACK_IMPORTED_MODULE_6__[/* Money */ \"a\"], {\n money: purchaseCost(),\n player: props.p\n }), \"?\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"These Duplicate Sleeves are permanent (they persist through BitNodes). You can purchase a total of\", \" \", _SleeveCovenantPurchases__WEBPACK_IMPORTED_MODULE_3__[/* MaxSleevesFromCovenant */ \"b\"], \" from The Covenant.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_5__[/* StdButton */ \"a\"], {\n disabled: purchaseDisabled,\n onClick: purchaseOnClick,\n text: \"Purchase\"\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"p\", null, \"Here, you can also purchase upgrades for your Duplicate Sleeves. These upgrades are also permanent, meaning they persist across BitNodes.\"), upgradePanels);\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx?"); /***/ }), -/* 1036 */ +/* 1038 */ /*!****************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx ***! \****************************************************************/ @@ -6886,10 +6888,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveUpgrades; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveMemoryUpgrade */ 1037);\n/**\n * React Component for a panel that lets you purchase upgrades for a single\n * Duplicate Sleeve through The Covenant\n */\n\n\nclass CovenantSleeveUpgrades extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Duplicate Sleeve \", this.props.index), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveMemoryUpgrade */ \"a\"], this.props));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveUpgrades; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CovenantSleeveMemoryUpgrade */ 1039);\n/**\n * React Component for a panel that lets you purchase upgrades for a single\n * Duplicate Sleeve through The Covenant\n */\n\n\nclass CovenantSleeveUpgrades extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"bladeburner-action\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h1\", null, \"Duplicate Sleeve \", this.props.index), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_CovenantSleeveMemoryUpgrade__WEBPACK_IMPORTED_MODULE_1__[/* CovenantSleeveMemoryUpgrade */ \"a\"], this.props));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveUpgrades.tsx?"); /***/ }), -/* 1037 */ +/* 1039 */ /*!*********************************************************************!*\ !*** ./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx ***! \*********************************************************************/ @@ -6901,7 +6903,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CovenantSleeveMemoryUpgrade; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../ui/React/Money */ 13);\n/**\n * React component for a panel that lets you purchase upgrades for a Duplicate\n * Sleeve's Memory (through The Covenant)\n */\n\n\n\n\nclass CovenantSleeveMemoryUpgrade extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n amt: 1\n };\n this.changePurchaseAmount = this.changePurchaseAmount.bind(this);\n this.purchaseMemory = this.purchaseMemory.bind(this);\n }\n\n changePurchaseAmount(e) {\n let n = parseInt(e.target.value);\n if (isNaN(n)) n = 1;\n const maxMemory = 100 - this.props.sleeve.memory;\n if (n > maxMemory) n = maxMemory;\n this.setState({\n amt: n\n });\n }\n\n getPurchaseCost() {\n if (isNaN(this.state.amt)) {\n return Infinity;\n }\n\n const maxMemory = 100 - this.props.sleeve.memory;\n\n if (this.state.amt > maxMemory) {\n return Infinity;\n }\n\n return this.props.sleeve.getMemoryUpgradeCost(this.state.amt);\n }\n\n purchaseMemory() {\n const cost = this.getPurchaseCost();\n\n if (this.props.p.canAfford(cost)) {\n this.props.sleeve.upgradeMemory(this.state.amt);\n this.props.p.loseMoney(cost);\n this.props.rerender();\n }\n }\n\n render() {\n const inputId = `sleeve-${this.props.index}-memory-upgrade-input`; // Memory cannot go above 100\n\n const maxMemory = 100 - this.props.sleeve.memory; // Purchase button props\n\n const cost = this.getPurchaseCost();\n const purchaseBtnDisabled = !this.props.p.canAfford(cost);\n let purchaseBtnContent;\n\n if (isNaN(this.state.amt)) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Invalid value\");\n } else if (this.state.amt > maxMemory) {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Memory cannot exceed 100\");\n } else {\n purchaseBtnContent = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchase \", this.state.amt, \" memory - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }), \"?\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"u\", null, \"Upgrade Memory\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:\", \" \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSleeveMemory(this.props.sleeve.memory), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"label\", {\n htmlFor: inputId\n }, \"Amount of memory to purchase (must be an integer):\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"text-input\",\n id: inputId,\n onChange: this.changePurchaseAmount,\n type: \"number\",\n value: this.state.amt\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n disabled: purchaseBtnDisabled,\n onClick: this.purchaseMemory,\n text: purchaseBtnContent\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx?"); /***/ }), -/* 1038 */ +/* 1040 */ /*!*******************************************!*\ !*** ./src/ui/React/PopupCloseButton.tsx ***! \*******************************************/ @@ -6910,10 +6912,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupCloseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 341);\n/* harmony import */ var _PopupButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PopupButton */ 1039);\n/**\n * Close button for popup dialog boxes\n * It creates an event handler such that pressing Esc will close the binded popup\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupCloseButton extends _PopupButton__WEBPACK_IMPORTED_MODULE_3__[/* PopupButton */ \"a\"] {\n constructor(props) {\n super(props);\n this.closePopup = this.closePopup.bind(this);\n }\n\n closePopup() {\n if (this.props.onClose) this.props.onClose();\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a\n // parent component\n\n\n if (popup instanceof HTMLElement) {\n // Removes everything inside the wrapper container\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup);\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.closePopup,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupCloseButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupCloseButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 343);\n/* harmony import */ var _PopupButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PopupButton */ 1041);\n/**\n * Close button for popup dialog boxes\n * It creates an event handler such that pressing Esc will close the binded popup\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupCloseButton extends _PopupButton__WEBPACK_IMPORTED_MODULE_3__[/* PopupButton */ \"a\"] {\n constructor(props) {\n super(props);\n this.closePopup = this.closePopup.bind(this);\n }\n\n closePopup() {\n if (this.props.onClose) this.props.onClose();\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a\n // parent component\n\n\n if (popup instanceof HTMLElement) {\n // Removes everything inside the wrapper container\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup);\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_2__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.closePopup,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupCloseButton.tsx?"); /***/ }), -/* 1039 */ +/* 1041 */ /*!**************************************!*\ !*** ./src/ui/React/PopupButton.tsx ***! \**************************************/ @@ -6922,10 +6924,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 116);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 341);\n/**\n * Basic button for popup dialog boxes\n * It creates an event handler such that pressing Esc will perform the click handler.\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.keyListener = this.keyListener.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener(\"keydown\", this.keyListener);\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.keyListener);\n }\n\n handleClick() {\n if (this.props.onClose) this.props.onClose(); //We might be able to remove this?\n //Clickhandler from the props will override this anyhow.\n\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a parent component\n\n\n if (popup instanceof HTMLElement) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup); // Removes everything inside the wrapper container\n\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n keyListener(e) {\n //This doesn't really make sense, a button doesnt have to listen to escape IMO\n //Too affraid to remove it since im not sure what it will break.. But yuck..\n if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__[/* KEY */ \"a\"].ESC) {\n this.handleClick();\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleClick,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupButton.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PopupButton; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ 117);\n/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../utils/helpers/keyCodes */ 75);\n/* harmony import */ var _utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/uiHelpers/removeElement */ 343);\n/**\n * Basic button for popup dialog boxes\n * It creates an event handler such that pressing Esc will perform the click handler.\n *\n * Should only be used in other React components, otherwise it may not be properly\n * unmounted\n */\n\n\n\n\nclass PopupButton extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick = this.handleClick.bind(this);\n this.keyListener = this.keyListener.bind(this);\n }\n\n componentDidMount() {\n document.addEventListener(\"keydown\", this.keyListener);\n }\n\n componentWillUnmount() {\n document.removeEventListener(\"keydown\", this.keyListener);\n }\n\n handleClick() {\n if (this.props.onClose) this.props.onClose(); //We might be able to remove this?\n //Clickhandler from the props will override this anyhow.\n\n let popup;\n\n if (typeof this.props.popup === \"string\") {\n popup = document.getElementById(this.props.popup);\n } else {\n popup = this.props.popup;\n } // TODO Check if this is okay? This is essentially calling to unmount a parent component\n\n\n if (popup instanceof HTMLElement) {\n react_dom__WEBPACK_IMPORTED_MODULE_1__[\"unmountComponentAtNode\"](popup); // Removes everything inside the wrapper container\n\n Object(_utils_uiHelpers_removeElement__WEBPACK_IMPORTED_MODULE_3__[/* removeElement */ \"a\"])(popup); // Removes the wrapper container\n }\n }\n\n keyListener(e) {\n //This doesn't really make sense, a button doesnt have to listen to escape IMO\n //Too affraid to remove it since im not sure what it will break.. But yuck..\n if (e.keyCode === _utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_2__[/* KEY */ \"a\"].ESC) {\n this.handleClick();\n }\n }\n\n render() {\n const className = this.props.class ? this.props.class : \"std-button\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: className,\n onClick: this.handleClick,\n style: this.props.style\n }, this.props.text);\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/PopupButton.tsx?"); /***/ }), -/* 1040 */ +/* 1042 */ /*!********************************************!*\ !*** ./src/Faction/ui/CreateGangPopup.tsx ***! \********************************************/ @@ -6937,7 +6939,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CreateGangPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/**\n * React Component for the popup used to create a new gang.\n */\n\n\n\n\nfunction CreateGangPopup(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_3__[/* use */ \"b\"].Router();\n const combatGangText = \"This is a COMBAT gang. Members in this gang will have different tasks than HACKING gangs. \" + \"Compared to hacking gangs, progression with combat gangs can be more difficult as territory management \" + \"is more important. However, well-managed combat gangs can progress faster than hacking ones.\";\n const hackingGangText = \"This is a HACKING gang. Members in this gang will have different tasks than COMBAT gangs. \" + \"Compared to combat gangs, progression with hacking gangs is more straightforward as territory warfare \" + \"is not as important.\";\n\n function isHacking() {\n return [\"NiteSec\", \"The Black Hand\"].includes(props.facName);\n }\n\n function createGang() {\n player.startGang(props.facName, isHacking());\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_1__[/* removePopup */ \"b\"])(props.popupId);\n router.toGang();\n }\n\n function onKeyUp(event) {\n if (event.keyCode === 13) createGang();\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"Would you like to create a new Gang with \", props.facName, \"?\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed. It also resets your reputation with this faction.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), isHacking() ? hackingGangText : combatGangText, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Other than hacking vs combat, there are NO differences between the Factions you can create a Gang with, and each of these Factions have all Augmentations available.\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"popup-box-input-div\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_2__[/* StdButton */ \"a\"], {\n onClick: createGang,\n onKeyUp: onKeyUp,\n text: \"Create Gang\",\n style: {\n float: \"right\"\n },\n autoFocus: true\n })));\n}\n\n//# sourceURL=webpack:///./src/Faction/ui/CreateGangPopup.tsx?"); /***/ }), -/* 1041 */ +/* 1043 */ /*!**********************************!*\ !*** ./src/ui/CharacterInfo.tsx ***! \**********************************/ @@ -6949,7 +6951,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterInfo; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../ui/numeralFormat */ 3);\n/* harmony import */ var _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode/BitNode */ 168);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../utils/DialogBox */ 10);\n/* harmony import */ var _utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../utils/StringHelperFunctions */ 12);\n/* harmony import */ var _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../BitNode/BitNodeMultipliers */ 8);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Server/ServerPurchases */ 173);\n/* harmony import */ var _Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Hacknet/data/Constants */ 32);\n/* harmony import */ var _React_StatsTable__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./React/StatsTable */ 186);\n/* harmony import */ var _React_Money__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./React/Money */ 13);\n/* harmony import */ var _Context__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./Context */ 43);\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction LastEmployer() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Employer at which you last worked: \", player.companyName), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction LastJob() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.companyName !== \"\") {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Job you last worked: \", player.jobs[player.companyName]), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Employers() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (player.jobs && Object.keys(player.jobs).length !== 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"All Employers:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"ul\", null, Object.keys(player.jobs).map(j => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"li\", {\n key: j\n }, \" * \", j))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction Hacknet() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player(); // Can't import HacknetHelpers for some reason.\n\n if (!(player.bitNodeN === 9 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][9] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Nodes owned: ${player.hacknetNodes.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n } else {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Hacknet Servers owned: ${player.hacknetNodes.length} / ${_Hacknet_data_Constants__WEBPACK_IMPORTED_MODULE_8__[/* HacknetServerConstants */ \"b\"].MaxServers}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n }\n}\n\nfunction Intelligence() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.intelligence > 0 && (player.bitNodeN === 5 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0)) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", null, \"Intelligence:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction MultiplierTable(props) {\n function bn5Stat(r) {\n if (_SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_6__[/* SourceFileFlags */ \"a\"][5] > 0 && r.length > 2 && r[1] != r[2]) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \" \", \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[2]), \")\");\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, props.rows.map(r => react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: r[0]\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, `${r[0]} multiplier:`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\",\n paddingLeft: \"5px\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(r[1])), bn5Stat(r))))));\n}\n\nfunction BladeburnerMults() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n if (!player.canAccessBladeburner()) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Bladeburner Success Chance\", player.bladeburner_max_stamina_mult], [\"Bladeburner Max Stamina\", player.bladeburner_stamina_gain_mult], [\"Bladeburner Stamina Gain\", player.bladeburner_analysis_mult], [\"Bladeburner Field Analysis\", player.bladeburner_success_chance_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null));\n}\n\nfunction CurrentBitNode() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n\n if (player.sourceFiles.length > 0) {\n const index = \"BitNode\" + player.bitNodeN;\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current BitNode: \", player.bitNodeN, \" (\", _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].name, \")\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n width: \"60%\",\n fontSize: \"13px\",\n marginLeft: \"2%\"\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n style: {\n whiteSpace: \"pre-wrap\",\n overflowWrap: \"break-word\"\n }\n }, _BitNode_BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][index].info)));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\nfunction CharacterInfo() {\n const player = _Context__WEBPACK_IMPORTED_MODULE_11__[/* use */ \"b\"].Player();\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 20);\n return () => clearInterval(id);\n }, []);\n\n function convertMoneySourceTrackerToString(src) {\n const parts = [[`Total:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.total\n })]];\n\n if (src.bladeburner) {\n parts.push([`Bladeburner:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.bladeburner\n })]);\n }\n\n if (src.codingcontract) {\n parts.push([`Coding Contracts:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.codingcontract\n })]);\n }\n\n if (src.work) {\n parts.push([`Company Work:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.work\n })]);\n }\n\n if (src.class) {\n parts.push([`Class:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.class\n })]);\n }\n\n if (src.corporation) {\n parts.push([`Corporation:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.corporation\n })]);\n }\n\n if (src.crime) {\n parts.push([`Crimes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.crime\n })]);\n }\n\n if (src.gang) {\n parts.push([`Gang:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.gang\n })]);\n }\n\n if (src.hacking) {\n parts.push([`Hacking:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacking\n })]);\n }\n\n if (src.hacknetnode) {\n parts.push([`Hacknet Nodes:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hacknetnode\n })]);\n }\n\n if (src.hospitalization) {\n parts.push([`Hospitalization:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.hospitalization\n })]);\n }\n\n if (src.infiltration) {\n parts.push([`Infiltration:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.infiltration\n })]);\n }\n\n if (src.stock) {\n parts.push([`Stock Market:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.stock\n })]);\n }\n\n if (src.casino) {\n parts.push([`Casino:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.casino\n })]);\n }\n\n if (src.sleeves) {\n parts.push([`Sleeves:`, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: src.sleeves\n })]);\n }\n\n return Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(parts);\n }\n\n function openMoneyModal() {\n let content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned since you last installed Augmentations:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceA));\n\n if (player.sourceFiles.length !== 0) {\n content = react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, content, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"u\", null, \"Money earned in this BitNode:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), convertMoneySourceTrackerToString(player.moneySourceB));\n }\n\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(content, false);\n }\n\n const timeRows = [[\"Time played since last Augmentation:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastAug)]];\n\n if (player.sourceFiles.length > 0) {\n timeRows.push([\"Time played since last Bitnode destroyed:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.playtimeSinceLastBitnode)]);\n }\n\n timeRows.push([\"Total Time played:\", Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_4__[/* convertTimeMsToTimeElapsedString */ \"b\"])(player.totalPlaytime)]);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"General\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Current City: \", player.city), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastEmployer, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(LastJob, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Employers, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"Money: \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_React_Money__WEBPACK_IMPORTED_MODULE_10__[/* Money */ \"a\"], {\n money: player.money.toNumber()\n })), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"popup-box-button\",\n style: {\n display: \"inline-block\",\n float: \"none\"\n },\n onClick: openMoneyModal\n }, \"Money Statistics & Breakdown\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Stats\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"table\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tbody\", null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"0\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Hacking:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.hacking_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"1\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Strength:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.strength_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"2\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Defense:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.defense_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"3\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Dexterity:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.dexterity_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"4\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Agility:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.agility_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"tr\", {\n key: \"5\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"0\"\n }, \"Charisma:\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"1\",\n style: {\n textAlign: \"right\"\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"td\", {\n key: \"2\",\n style: {\n textAlign: \"right\"\n }\n }, \"(\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatExp(player.charisma_exp), \" exp)\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Chance\", player.hacking_chance_mult], [\"Hacking Speed\", player.hacking_speed_mult], [\"Hacking Money\", player.hacking_money_mult, player.hacking_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ScriptHackMoney], [\"Hacking Growth\", player.hacking_grow_mult, player.hacking_grow_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].ServerGrowthRate]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacking Level\", player.hacking_mult, player.hacking_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackingLevelMultiplier], [\"Hacking Experience\", player.hacking_exp_mult, player.hacking_exp_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HackExpGain]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Strength Level\", player.strength_mult, player.strength_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].StrengthLevelMultiplier], [\"Strength Experience\", player.strength_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Defense Level\", player.defense_mult, player.defense_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DefenseLevelMultiplier], [\"Defense Experience\", player.defense_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Dexterity Level\", player.dexterity_mult, player.dexterity_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].DexterityLevelMultiplier], [\"Dexterity Experience\", player.dexterity_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Agility Level\", player.agility_mult, player.agility_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].AgilityLevelMultiplier], [\"Agility Experience\", player.agility_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Charisma Level\", player.charisma_mult, player.charisma_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CharismaLevelMultiplier], [\"Charisma Experience\", player.charisma_exp_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Hacknet Node production\", player.hacknet_node_money_mult, player.hacknet_node_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].HacknetNodeMoney], [\"Hacknet Node purchase cost\", player.hacknet_node_purchase_cost_mult], [\"Hacknet Node RAM upgrade cost\", player.hacknet_node_ram_cost_mult], [\"Hacknet Node Core purchase cost\", player.hacknet_node_core_cost_mult], [\"Hacknet Node level upgrade cost\", player.hacknet_node_level_cost_mult]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Company reputation gain\", player.company_rep_mult], [\"Faction reputation gain\", player.faction_rep_mult, player.faction_rep_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].FactionWorkRepGain], [\"Salary\", player.work_money_mult, player.work_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CompanyWorkMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(MultiplierTable, {\n rows: [[\"Crime success\", player.crime_success_mult], [\"Crime money\", player.crime_money_mult, player.crime_money_mult * _BitNode_BitNodeMultipliers__WEBPACK_IMPORTED_MODULE_5__[/* BitNodeMultipliers */ \"a\"].CrimeMoney]]\n }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BladeburnerMults, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"b\", null, \"Misc.\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Servers owned: ${player.purchasedServers.length} / ${Object(_Server_ServerPurchases__WEBPACK_IMPORTED_MODULE_7__[/* getPurchaseServerLimit */ \"b\"])()}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Hacknet, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, `Augmentations installed: ${player.augmentations.length}`), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), Object(_React_StatsTable__WEBPACK_IMPORTED_MODULE_9__[/* StatsTable */ \"a\"])(timeRows), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(CurrentBitNode, null)));\n}\n\n//# sourceURL=webpack:///./src/ui/CharacterInfo.tsx?"); /***/ }), -/* 1042 */ +/* 1044 */ /*!************************************************!*\ !*** ./src/StockMarket/ui/StockMarketRoot.tsx ***! \************************************************/ @@ -6958,10 +6960,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarketRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InfoAndPurchases */ 1043);\n/* harmony import */ var _StockTickers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickers */ 1044);\n/**\n * Root React component for the Stock Market UI\n */\n\n\n\nfunction StockMarketRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"stock-market-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__[/* InfoAndPurchases */ \"a\"], {\n initStockMarket: props.initStockMarket,\n p: props.p,\n rerender: rerender\n }), props.p.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockTickers__WEBPACK_IMPORTED_MODULE_2__[/* StockTickers */ \"a\"], {\n buyStockLong: props.buyStockLong,\n buyStockShort: props.buyStockShort,\n cancelOrder: props.cancelOrder,\n eventEmitterForReset: props.eventEmitterForReset,\n p: props.p,\n placeOrder: props.placeOrder,\n sellStockLong: props.sellStockLong,\n sellStockShort: props.sellStockShort,\n stockMarket: props.stockMarket\n }));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockMarketRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockMarketRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./InfoAndPurchases */ 1045);\n/* harmony import */ var _StockTickers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickers */ 1046);\n/**\n * Root React component for the Stock Market UI\n */\n\n\n\nfunction StockMarketRoot(props) {\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n\n function rerender() {\n setRerender(old => !old);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"stock-market-container\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_InfoAndPurchases__WEBPACK_IMPORTED_MODULE_1__[/* InfoAndPurchases */ \"a\"], {\n initStockMarket: props.initStockMarket,\n p: props.p,\n rerender: rerender\n }), props.p.hasWseAccount && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_StockTickers__WEBPACK_IMPORTED_MODULE_2__[/* StockTickers */ \"a\"], {\n buyStockLong: props.buyStockLong,\n buyStockShort: props.buyStockShort,\n cancelOrder: props.cancelOrder,\n eventEmitterForReset: props.eventEmitterForReset,\n p: props.p,\n placeOrder: props.placeOrder,\n sellStockLong: props.sellStockLong,\n sellStockShort: props.sellStockShort,\n stockMarket: props.stockMarket\n }));\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockMarketRoot.tsx?"); /***/ }), -/* 1043 */ +/* 1045 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/InfoAndPurchases.tsx ***! \*************************************************/ @@ -6970,10 +6972,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfoAndPurchases; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../StockMarketCosts */ 219);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React component for the Stock Market UI. This component displays\n * general information about the stock market, buttons for the various purchases,\n * and a link to the documentation (Investopedia)\n */\n\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass InfoAndPurchases extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick4SMarketDataHelpTip = this.handleClick4SMarketDataHelpTip.bind(this);\n this.purchaseWseAccount = this.purchaseWseAccount.bind(this);\n this.purchaseTixApiAccess = this.purchaseTixApiAccess.bind(this);\n this.purchase4SMarketData = this.purchase4SMarketData.bind(this);\n this.purchase4SMarketDataTixApiAccess = this.purchase4SMarketDataTixApiAccess.bind(this);\n }\n\n handleClick4SMarketDataHelpTip() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Access to the 4S Market Data feed will display two additional pieces \" + \"of information about each stock: Price Forecast & Volatility

\" + \"Price Forecast indicates the probability the stock has of increasing or \" + \"decreasing. A '+' forecast means the stock has a higher chance of increasing \" + \"than decreasing, and a '-' means the opposite. The number of '+/-' symbols \" + \"is used to illustrate the magnitude of these probabilities. For example, \" + \"'+++' means that the stock has a significantly higher chance of increasing \" + \"than decreasing, while '+' means that the stock only has a slightly higher chance \" + \"of increasing than decreasing.

\" + \"Volatility represents the maximum percentage by which a stock's price \" + \"can change every tick (a tick occurs every few seconds while the game \" + \"is running).

\" + \"A stock's price forecast can change over time. This is also affected by volatility. \" + \"The more volatile a stock is, the more its price forecast will change.\");\n }\n\n purchaseWseAccount() {\n if (this.props.p.hasWseAccount) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost)) {\n return;\n }\n\n this.props.p.hasWseAccount = true;\n this.props.initStockMarket();\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost);\n this.props.rerender();\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n purchaseTixApiAccess() {\n if (this.props.p.hasTixApiAccess) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost)) {\n return;\n }\n\n this.props.p.hasTixApiAccess = true;\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost);\n this.props.rerender();\n }\n\n purchase4SMarketData() {\n if (this.props.p.has4SData) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])())) {\n return;\n }\n\n this.props.p.has4SData = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])());\n this.props.rerender();\n }\n\n purchase4SMarketDataTixApiAccess() {\n if (this.props.p.has4SDataTixApi) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n return;\n }\n\n this.props.p.has4SDataTixApi = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])());\n this.props.rerender();\n }\n\n renderPurchaseWseAccountButton() {\n if (this.props.p.hasWseAccount) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"WSE Account - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchaseWseAccount,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy WSE Account - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchaseTixApiAccessButton() {\n if (this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"TIX API Access - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchaseTixApiAccess,\n style: blockStyleMarkup,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy Trade Information eXchange (TIX) API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchase4SMarketDataButton() {\n if (this.props.p.has4SData) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data - Purchased\",\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchase4SMarketData,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n }\n }\n\n renderPurchase4SMarketDataTixApiAccessButton() {\n if (!this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: true,\n text: `Buy 4S Market Data TIX API Access`,\n tooltip: \"Requires TIX API Access\"\n });\n } else if (this.props.p.has4SDataTixApi) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data TIX API - Purchased\",\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchase4SMarketDataTixApiAccess,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data TIX API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n }\n }\n\n render() {\n const documentationLink = \"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-info-and-purchases\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Welcome to the World Stock Exchange (WSE)!\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", {\n href: documentationLink,\n target: \"_blank\"\n }, \"Investopedia\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"To begin trading, you must first purchase an account:\"), this.renderPurchaseWseAccountButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Trade Information eXchange (TIX) API\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies.\"), this.renderPurchaseTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Four Sigma (4S) Market Data Feed\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.\"), this.renderPurchase4SMarketDataButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"help-tip-big\",\n onClick: this.handleClick4SMarketDataHelpTip\n }, \"?\"), this.renderPurchase4SMarketDataTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Commission Fees: Every transaction you make has a\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission,\n player: this.props.p\n }), \" commission fee.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return InfoAndPurchases; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../StockMarketCosts */ 220);\n/* harmony import */ var _Constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Constants */ 5);\n/* harmony import */ var _ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/StdButton */ 23);\n/* harmony import */ var _ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/StdButtonPurchased */ 228);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React component for the Stock Market UI. This component displays\n * general information about the stock market, buttons for the various purchases,\n * and a link to the documentation (Investopedia)\n */\n\n\n\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass InfoAndPurchases extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleClick4SMarketDataHelpTip = this.handleClick4SMarketDataHelpTip.bind(this);\n this.purchaseWseAccount = this.purchaseWseAccount.bind(this);\n this.purchaseTixApiAccess = this.purchaseTixApiAccess.bind(this);\n this.purchase4SMarketData = this.purchase4SMarketData.bind(this);\n this.purchase4SMarketDataTixApiAccess = this.purchase4SMarketDataTixApiAccess.bind(this);\n }\n\n handleClick4SMarketDataHelpTip() {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_6__[/* dialogBoxCreate */ \"a\"])(\"Access to the 4S Market Data feed will display two additional pieces \" + \"of information about each stock: Price Forecast & Volatility

\" + \"Price Forecast indicates the probability the stock has of increasing or \" + \"decreasing. A '+' forecast means the stock has a higher chance of increasing \" + \"than decreasing, and a '-' means the opposite. The number of '+/-' symbols \" + \"is used to illustrate the magnitude of these probabilities. For example, \" + \"'+++' means that the stock has a significantly higher chance of increasing \" + \"than decreasing, while '+' means that the stock only has a slightly higher chance \" + \"of increasing than decreasing.

\" + \"Volatility represents the maximum percentage by which a stock's price \" + \"can change every tick (a tick occurs every few seconds while the game \" + \"is running).

\" + \"A stock's price forecast can change over time. This is also affected by volatility. \" + \"The more volatile a stock is, the more its price forecast will change.\");\n }\n\n purchaseWseAccount() {\n if (this.props.p.hasWseAccount) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost)) {\n return;\n }\n\n this.props.p.hasWseAccount = true;\n this.props.initStockMarket();\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost);\n this.props.rerender();\n const worldHeader = document.getElementById(\"world-menu-header\");\n\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n }\n\n purchaseTixApiAccess() {\n if (this.props.p.hasTixApiAccess) {\n return;\n }\n\n if (!this.props.p.canAfford(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost)) {\n return;\n }\n\n this.props.p.hasTixApiAccess = true;\n this.props.p.loseMoney(_Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost);\n this.props.rerender();\n }\n\n purchase4SMarketData() {\n if (this.props.p.has4SData) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])())) {\n return;\n }\n\n this.props.p.has4SData = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])());\n this.props.rerender();\n }\n\n purchase4SMarketDataTixApiAccess() {\n if (this.props.p.has4SDataTixApi) {\n return;\n }\n\n if (!this.props.p.canAfford(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])())) {\n return;\n }\n\n this.props.p.has4SDataTixApi = true;\n this.props.p.loseMoney(Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])());\n this.props.rerender();\n }\n\n renderPurchaseWseAccountButton() {\n if (this.props.p.hasWseAccount) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"WSE Account - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].WSEAccountCost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchaseWseAccount,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy WSE Account - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchaseTixApiAccessButton() {\n if (this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"TIX API Access - Purchased\"\n });\n } else {\n const cost = _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].TIXAPICost;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchaseTixApiAccess,\n style: blockStyleMarkup,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy Trade Information eXchange (TIX) API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n }))\n });\n }\n }\n\n renderPurchase4SMarketDataButton() {\n if (this.props.p.has4SData) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data - Purchased\",\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4SDataCost */ \"a\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost) || !this.props.p.hasWseAccount,\n onClick: this.purchase4SMarketData,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Lets you view additional pricing and volatility information about stocks\"\n });\n }\n }\n\n renderPurchase4SMarketDataTixApiAccessButton() {\n if (!this.props.p.hasTixApiAccess) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: true,\n text: `Buy 4S Market Data TIX API Access`,\n tooltip: \"Requires TIX API Access\"\n });\n } else if (this.props.p.has4SDataTixApi) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButtonPurchased__WEBPACK_IMPORTED_MODULE_4__[/* StdButtonPurchased */ \"a\"], {\n text: \"4S Market Data TIX API - Purchased\",\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n } else {\n const cost = Object(_StockMarketCosts__WEBPACK_IMPORTED_MODULE_1__[/* getStockMarket4STixApiCost */ \"b\"])();\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_StdButton__WEBPACK_IMPORTED_MODULE_3__[/* StdButton */ \"a\"], {\n disabled: !this.props.p.canAfford(cost),\n onClick: this.purchase4SMarketDataTixApiAccess,\n text: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Buy 4S Market Data TIX API Access - \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: cost,\n player: this.props.p\n })),\n tooltip: \"Let you access 4S Market Data through Netscript\"\n });\n }\n }\n\n render() {\n const documentationLink = \"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html\";\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-info-and-purchases\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Welcome to the World Stock Exchange (WSE)!\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"a\", {\n href: documentationLink,\n target: \"_blank\"\n }, \"Investopedia\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"To begin trading, you must first purchase an account:\"), this.renderPurchaseWseAccountButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Trade Information eXchange (TIX) API\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"TIX, short for Trade Information eXchange, is the communications protocol used by the WSE. Purchasing access to the TIX API lets you write code to create your own algorithmic/automated trading strategies.\"), this.renderPurchaseTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h2\", null, \"Four Sigma (4S) Market Data Feed\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Four Sigma's (4S) Market Data Feed provides information about stocks that will help your trading strategies.\"), this.renderPurchase4SMarketDataButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"help-tip-big\",\n onClick: this.handleClick4SMarketDataHelpTip\n }, \"?\"), this.renderPurchase4SMarketDataTixApiAccessButton(), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Commission Fees: Every transaction you make has a\", \" \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_5__[/* Money */ \"a\"], {\n money: _Constants__WEBPACK_IMPORTED_MODULE_2__[/* CONSTANTS */ \"a\"].StockMarketCommission,\n player: this.props.p\n }), \" commission fee.\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"WARNING: When you reset after installing Augmentations, the Stock Market is reset. You will retain your WSE Account, access to the TIX API, and 4S Market Data access. However, all of your stock positions are lost, so make sure to sell your stocks before installing Augmentations!\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx?"); /***/ }), -/* 1044 */ +/* 1046 */ /*!*********************************************!*\ !*** ./src/StockMarket/ui/StockTickers.tsx ***! \*********************************************/ @@ -6982,10 +6984,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTicker */ 1045);\n/* harmony import */ var _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickersConfig */ 331);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Stock */ 103);\n/* harmony import */ var _ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/ErrorBoundary */ 1050);\n/**\n * React Component for the Stock Market UI. This is the container for all\n * of the stock tickers. It also contains the configuration for the\n * stock ticker UI (watchlist filter, portfolio vs all mode, etc.)\n */\n\n\n\n\n\nclass StockTickers extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false,\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks,\n watchlistFilter: \"\",\n watchlistSymbols: []\n };\n this.changeDisplayMode = this.changeDisplayMode.bind(this);\n this.changeWatchlistFilter = this.changeWatchlistFilter.bind(this);\n this.collapseAllTickers = this.collapseAllTickers.bind(this);\n this.expandAllTickers = this.expandAllTickers.bind(this);\n this.rerender = this.rerender.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n changeDisplayMode() {\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks) {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio\n });\n } else {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks\n });\n }\n }\n\n changeWatchlistFilter(e) {\n const watchlist = e.target.value;\n const sanitizedWatchlist = watchlist.replace(/\\s/g, \"\");\n this.setState({\n watchlistFilter: watchlist\n });\n\n if (sanitizedWatchlist !== \"\") {\n this.setState({\n watchlistSymbols: sanitizedWatchlist.split(\",\")\n });\n } else {\n this.setState({\n watchlistSymbols: []\n });\n }\n }\n\n collapseAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n render() {\n const tickers = [];\n\n for (const stockMarketProp in this.props.stockMarket) {\n const val = this.props.stockMarket[stockMarketProp];\n\n if (val instanceof _Stock__WEBPACK_IMPORTED_MODULE_3__[/* Stock */ \"a\"]) {\n // Skip if there's a filter and the stock isnt in that filter\n if (this.state.watchlistSymbols.length > 0 && !this.state.watchlistSymbols.includes(val.symbol)) {\n continue;\n }\n\n let orders = this.props.stockMarket.Orders[val.symbol];\n\n if (orders == null) {\n orders = [];\n } // Skip if we're in portfolio mode and the player doesnt own this or have any active orders\n\n\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio) {\n if (val.playerShares === 0 && val.playerShortShares === 0 && orders.length === 0) {\n continue;\n }\n }\n\n tickers.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTicker__WEBPACK_IMPORTED_MODULE_1__[/* StockTicker */ \"a\"], {\n buyStockLong: this.props.buyStockLong,\n buyStockShort: this.props.buyStockShort,\n cancelOrder: this.props.cancelOrder,\n key: val.symbol,\n orders: orders,\n p: this.props.p,\n placeOrder: this.props.placeOrder,\n rerenderAllTickers: this.rerender,\n sellStockLong: this.props.sellStockLong,\n sellStockShort: this.props.sellStockShort,\n stock: val\n }));\n }\n }\n\n const errorBoundaryProps = {\n eventEmitterForReset: this.props.eventEmitterForReset,\n id: \"StockTickersErrorBoundary\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__[/* ErrorBoundary */ \"a\"], errorBoundaryProps, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* StockTickersConfig */ \"a\"], {\n changeDisplayMode: this.changeDisplayMode,\n changeWatchlistFilter: this.changeWatchlistFilter,\n collapseAllTickers: this.collapseAllTickers,\n expandAllTickers: this.expandAllTickers,\n tickerDisplayMode: this.state.tickerDisplayMode\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n id: \"stock-market-list\",\n ref: this.listRef\n }, tickers));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickers.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickers; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTicker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTicker */ 1047);\n/* harmony import */ var _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickersConfig */ 333);\n/* harmony import */ var _Stock__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../Stock */ 104);\n/* harmony import */ var _ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../ui/React/ErrorBoundary */ 1052);\n/**\n * React Component for the Stock Market UI. This is the container for all\n * of the stock tickers. It also contains the configuration for the\n * stock ticker UI (watchlist filter, portfolio vs all mode, etc.)\n */\n\n\n\n\n\nclass StockTickers extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n rerenderFlag: false,\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks,\n watchlistFilter: \"\",\n watchlistSymbols: []\n };\n this.changeDisplayMode = this.changeDisplayMode.bind(this);\n this.changeWatchlistFilter = this.changeWatchlistFilter.bind(this);\n this.collapseAllTickers = this.collapseAllTickers.bind(this);\n this.expandAllTickers = this.expandAllTickers.bind(this);\n this.rerender = this.rerender.bind(this);\n this.listRef = react__WEBPACK_IMPORTED_MODULE_0__[\"createRef\"]();\n }\n\n changeDisplayMode() {\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks) {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio\n });\n } else {\n this.setState({\n tickerDisplayMode: _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].AllStocks\n });\n }\n }\n\n changeWatchlistFilter(e) {\n const watchlist = e.target.value;\n const sanitizedWatchlist = watchlist.replace(/\\s/g, \"\");\n this.setState({\n watchlistFilter: watchlist\n });\n\n if (sanitizedWatchlist !== \"\") {\n this.setState({\n watchlistSymbols: sanitizedWatchlist.split(\",\")\n });\n } else {\n this.setState({\n watchlistSymbols: []\n });\n }\n }\n\n collapseAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n expandAllTickers() {\n const ul = this.listRef.current;\n\n if (ul == null) {\n return;\n }\n\n const tickers = ul.getElementsByClassName(\"accordion-header\");\n\n for (let i = 0; i < tickers.length; ++i) {\n const ticker = tickers[i];\n\n if (!(ticker instanceof HTMLButtonElement)) {\n continue;\n }\n\n if (!ticker.classList.contains(\"active\")) {\n ticker.click();\n }\n }\n }\n\n rerender() {\n this.setState(prevState => {\n return {\n rerenderFlag: !prevState.rerenderFlag\n };\n });\n }\n\n render() {\n const tickers = [];\n\n for (const stockMarketProp in this.props.stockMarket) {\n const val = this.props.stockMarket[stockMarketProp];\n\n if (val instanceof _Stock__WEBPACK_IMPORTED_MODULE_3__[/* Stock */ \"a\"]) {\n // Skip if there's a filter and the stock isnt in that filter\n if (this.state.watchlistSymbols.length > 0 && !this.state.watchlistSymbols.includes(val.symbol)) {\n continue;\n }\n\n let orders = this.props.stockMarket.Orders[val.symbol];\n\n if (orders == null) {\n orders = [];\n } // Skip if we're in portfolio mode and the player doesnt own this or have any active orders\n\n\n if (this.state.tickerDisplayMode === _StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* TickerDisplayMode */ \"b\"].Portfolio) {\n if (val.playerShares === 0 && val.playerShortShares === 0 && orders.length === 0) {\n continue;\n }\n }\n\n tickers.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTicker__WEBPACK_IMPORTED_MODULE_1__[/* StockTicker */ \"a\"], {\n buyStockLong: this.props.buyStockLong,\n buyStockShort: this.props.buyStockShort,\n cancelOrder: this.props.cancelOrder,\n key: val.symbol,\n orders: orders,\n p: this.props.p,\n placeOrder: this.props.placeOrder,\n rerenderAllTickers: this.rerender,\n sellStockLong: this.props.sellStockLong,\n sellStockShort: this.props.sellStockShort,\n stock: val\n }));\n }\n }\n\n const errorBoundaryProps = {\n eventEmitterForReset: this.props.eventEmitterForReset,\n id: \"StockTickersErrorBoundary\"\n };\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_ErrorBoundary__WEBPACK_IMPORTED_MODULE_4__[/* ErrorBoundary */ \"a\"], errorBoundaryProps, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickersConfig__WEBPACK_IMPORTED_MODULE_2__[/* StockTickersConfig */ \"a\"], {\n changeDisplayMode: this.changeDisplayMode,\n changeWatchlistFilter: this.changeWatchlistFilter,\n collapseAllTickers: this.collapseAllTickers,\n expandAllTickers: this.expandAllTickers,\n tickerDisplayMode: this.state.tickerDisplayMode\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n id: \"stock-market-list\",\n ref: this.listRef\n }, tickers));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickers.tsx?"); /***/ }), -/* 1045 */ +/* 1047 */ /*!********************************************!*\ !*** ./src/StockMarket/ui/StockTicker.tsx ***! \********************************************/ @@ -6994,10 +6996,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTicker; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerHeaderText */ 1046);\n/* harmony import */ var _StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickerOrderList */ 1047);\n/* harmony import */ var _StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockTickerPositionText */ 1049);\n/* harmony import */ var _StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StockTickerTxButton */ 413);\n/* harmony import */ var _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlaceOrderPopup */ 414);\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../StockMarketHelpers */ 156);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for a single stock ticker in the Stock Market UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SelectorOrderType;\n\n(function (SelectorOrderType) {\n SelectorOrderType[\"Market\"] = \"Market Order\";\n SelectorOrderType[\"Limit\"] = \"Limit Order\";\n SelectorOrderType[\"Stop\"] = \"Stop Order\";\n})(SelectorOrderType || (SelectorOrderType = {}));\n\nclass StockTicker extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n orderType: SelectorOrderType.Market,\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long,\n qty: \"\"\n };\n this.getBuyTransactionCostContent = this.getBuyTransactionCostContent.bind(this);\n this.getSellTransactionCostContent = this.getSellTransactionCostContent.bind(this);\n this.handleBuyButtonClick = this.handleBuyButtonClick.bind(this);\n this.handleBuyMaxButtonClick = this.handleBuyMaxButtonClick.bind(this);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.handleOrderTypeChange = this.handleOrderTypeChange.bind(this);\n this.handlePositionTypeChange = this.handlePositionTypeChange.bind(this);\n this.handleQuantityChange = this.handleQuantityChange.bind(this);\n this.handleSellButtonClick = this.handleSellButtonClick.bind(this);\n this.handleSellAllButtonClick = this.handleSellAllButtonClick.bind(this);\n }\n\n getBuyTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getBuyTransactionCost */ \"b\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will cost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n getQuantity() {\n return Math.round(parseFloat(this.state.qty));\n }\n\n getSellTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long) {\n if (qty > stock.playerShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Long position\");\n }\n } else {\n if (qty > stock.playerShortShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Short position\");\n }\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getSellTransactionGain */ \"c\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Selling \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will result in a gain of \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n handleBuyButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(this.props.stock, shares);\n } else {\n this.props.buyStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Buy Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Buy Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleBuyMaxButtonClick() {\n const playerMoney = this.props.p.money.toNumber();\n const stock = this.props.stock;\n let maxShares = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* calculateBuyMaxAmount */ \"a\"])(stock, this.state.position, playerMoney);\n maxShares = Math.min(maxShares, Math.round(stock.maxShares - stock.playerShares - stock.playerShortShares));\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(stock, maxShares);\n } else {\n this.props.buyStockLong(stock, maxShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Buy Max' only works for Market Orders`);\n break;\n }\n }\n }\n\n handleHeaderClick(e) {\n const elem = e.currentTarget;\n elem.classList.toggle(\"active\");\n const panel = elem.nextElementSibling;\n\n if (panel.style.display === \"block\") {\n panel.style.display = \"none\";\n } else {\n panel.style.display = \"block\";\n }\n }\n\n handleOrderTypeChange(e) {\n const val = e.target.value; // The select value returns a string. Afaik TypeScript doesnt make it easy\n // to convert that string back to an enum type so we'll just do this for now\n\n switch (val) {\n case SelectorOrderType.Limit:\n this.setState({\n orderType: SelectorOrderType.Limit\n });\n break;\n\n case SelectorOrderType.Stop:\n this.setState({\n orderType: SelectorOrderType.Stop\n });\n break;\n\n case SelectorOrderType.Market:\n default:\n this.setState({\n orderType: SelectorOrderType.Market\n });\n }\n }\n\n handlePositionTypeChange(e) {\n const val = e.target.value;\n\n if (val === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n });\n } else {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n });\n }\n }\n\n handleQuantityChange(e) {\n this.setState({\n qty: e.target.value\n });\n }\n\n handleSellButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(this.props.stock, shares);\n } else {\n this.props.sellStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Sell Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Sell Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleSellAllButtonClick() {\n const stock = this.props.stock;\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(stock, stock.playerShortShares);\n } else {\n this.props.sellStockLong(stock, stock.playerShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Sell All' only works for Market Orders`);\n break;\n }\n }\n } // Whether the player has access to orders besides market orders (limit/stop)\n\n\n hasOrderAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 3;\n } // Whether the player has access to shorting stocks\n\n\n hasShortAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 2;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerHeaderText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"stock-market-input\",\n onChange: this.handleQuantityChange,\n placeholder: \"Quantity (Shares)\",\n value: this.state.qty\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handlePositionTypeChange,\n value: this.state.position\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n }, \"Long\"), this.hasShortAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n }, \"Short\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handleOrderTypeChange,\n value: this.state.orderType\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Market\n }, SelectorOrderType.Market), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Limit\n }, SelectorOrderType.Limit), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Stop\n }, SelectorOrderType.Stop)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyButtonClick,\n text: \"Buy\",\n tooltip: this.getBuyTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellButtonClick,\n text: \"Sell\",\n tooltip: this.getSellTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyMaxButtonClick,\n text: \"Buy MAX\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellAllButtonClick,\n text: \"Sell ALL\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__[/* StockTickerPositionText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__[/* StockTickerOrderList */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n orders: this.props.orders,\n p: this.props.p,\n stock: this.props.stock\n }))\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTicker.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTicker; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerHeaderText */ 1048);\n/* harmony import */ var _StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./StockTickerOrderList */ 1049);\n/* harmony import */ var _StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./StockTickerPositionText */ 1051);\n/* harmony import */ var _StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./StockTickerTxButton */ 414);\n/* harmony import */ var _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./PlaceOrderPopup */ 415);\n/* harmony import */ var _StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../StockMarketHelpers */ 156);\n/* harmony import */ var _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../data/OrderTypes */ 80);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../ui/React/BBAccordion */ 224);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n/**\n * React Component for a single stock ticker in the Stock Market UI\n */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar SelectorOrderType;\n\n(function (SelectorOrderType) {\n SelectorOrderType[\"Market\"] = \"Market Order\";\n SelectorOrderType[\"Limit\"] = \"Limit Order\";\n SelectorOrderType[\"Stop\"] = \"Stop Order\";\n})(SelectorOrderType || (SelectorOrderType = {}));\n\nclass StockTicker extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n orderType: SelectorOrderType.Market,\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long,\n qty: \"\"\n };\n this.getBuyTransactionCostContent = this.getBuyTransactionCostContent.bind(this);\n this.getSellTransactionCostContent = this.getSellTransactionCostContent.bind(this);\n this.handleBuyButtonClick = this.handleBuyButtonClick.bind(this);\n this.handleBuyMaxButtonClick = this.handleBuyMaxButtonClick.bind(this);\n this.handleHeaderClick = this.handleHeaderClick.bind(this);\n this.handleOrderTypeChange = this.handleOrderTypeChange.bind(this);\n this.handlePositionTypeChange = this.handlePositionTypeChange.bind(this);\n this.handleQuantityChange = this.handleQuantityChange.bind(this);\n this.handleSellButtonClick = this.handleSellButtonClick.bind(this);\n this.handleSellAllButtonClick = this.handleSellAllButtonClick.bind(this);\n }\n\n getBuyTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getBuyTransactionCost */ \"b\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Purchasing \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will cost \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n getQuantity() {\n return Math.round(parseFloat(this.state.qty));\n }\n\n getSellTransactionCostContent() {\n const stock = this.props.stock;\n const qty = this.getQuantity();\n\n if (isNaN(qty)) {\n return null;\n }\n\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long) {\n if (qty > stock.playerShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Long position\");\n }\n } else {\n if (qty > stock.playerShortShares) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"You do not have this many shares in the Short position\");\n }\n }\n\n const cost = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* getSellTransactionGain */ \"c\"])(stock, qty, this.state.position);\n\n if (cost == null) {\n return null;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, \"Selling \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_10__[/* numeralWrapper */ \"a\"].formatShares(qty), \" shares (\", this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long ? \"Long\" : \"Short\", \") will result in a gain of \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_12__[/* Money */ \"a\"], {\n money: cost\n }), \".\");\n }\n\n handleBuyButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(this.props.stock, shares);\n } else {\n this.props.buyStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Buy Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Buy Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopBuy, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleBuyMaxButtonClick() {\n const playerMoney = this.props.p.money.toNumber();\n const stock = this.props.stock;\n let maxShares = Object(_StockMarketHelpers__WEBPACK_IMPORTED_MODULE_6__[/* calculateBuyMaxAmount */ \"a\"])(stock, this.state.position, playerMoney);\n maxShares = Math.min(maxShares, Math.round(stock.maxShares - stock.playerShares - stock.playerShortShares));\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.buyStockShort(stock, maxShares);\n } else {\n this.props.buyStockLong(stock, maxShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Buy Max' only works for Market Orders`);\n break;\n }\n }\n }\n\n handleHeaderClick(e) {\n const elem = e.currentTarget;\n elem.classList.toggle(\"active\");\n const panel = elem.nextElementSibling;\n\n if (panel.style.display === \"block\") {\n panel.style.display = \"none\";\n } else {\n panel.style.display = \"block\";\n }\n }\n\n handleOrderTypeChange(e) {\n const val = e.target.value; // The select value returns a string. Afaik TypeScript doesnt make it easy\n // to convert that string back to an enum type so we'll just do this for now\n\n switch (val) {\n case SelectorOrderType.Limit:\n this.setState({\n orderType: SelectorOrderType.Limit\n });\n break;\n\n case SelectorOrderType.Stop:\n this.setState({\n orderType: SelectorOrderType.Stop\n });\n break;\n\n case SelectorOrderType.Market:\n default:\n this.setState({\n orderType: SelectorOrderType.Market\n });\n }\n }\n\n handlePositionTypeChange(e) {\n const val = e.target.value;\n\n if (val === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n });\n } else {\n this.setState({\n position: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n });\n }\n }\n\n handleQuantityChange(e) {\n this.setState({\n qty: e.target.value\n });\n }\n\n handleSellButtonClick() {\n const shares = this.getQuantity();\n\n if (isNaN(shares)) {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`Invalid input for quantity (number of shares): ${this.state.qty}`);\n return;\n }\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(this.props.stock, shares);\n } else {\n this.props.sellStockLong(this.props.stock, shares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n case SelectorOrderType.Limit:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Limit Order\",\n placeText: \"Place Sell Limit Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].LimitSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n case SelectorOrderType.Stop:\n {\n const popupId = `place-order-popup`;\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_13__[/* createPopup */ \"a\"])(popupId, _PlaceOrderPopup__WEBPACK_IMPORTED_MODULE_5__[/* PlaceOrderPopup */ \"a\"], {\n text: \"Enter the price for your Stop Order\",\n placeText: \"Place Sell Stop Order\",\n place: price => this.props.placeOrder(this.props.stock, shares, price, _data_OrderTypes__WEBPACK_IMPORTED_MODULE_7__[/* OrderTypes */ \"a\"].StopSell, this.state.position),\n popupId: popupId\n });\n break;\n }\n\n default:\n break;\n }\n }\n\n handleSellAllButtonClick() {\n const stock = this.props.stock;\n\n switch (this.state.orderType) {\n case SelectorOrderType.Market:\n {\n if (this.state.position === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short) {\n this.props.sellStockShort(stock, stock.playerShortShares);\n } else {\n this.props.sellStockLong(stock, stock.playerShares);\n }\n\n this.props.rerenderAllTickers();\n break;\n }\n\n default:\n {\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_14__[/* dialogBoxCreate */ \"a\"])(`ERROR: 'Sell All' only works for Market Orders`);\n break;\n }\n }\n } // Whether the player has access to orders besides market orders (limit/stop)\n\n\n hasOrderAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 3;\n } // Whether the player has access to shorting stocks\n\n\n hasShortAccess() {\n return this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_9__[/* SourceFileFlags */ \"a\"][8] >= 2;\n }\n\n render() {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_BBAccordion__WEBPACK_IMPORTED_MODULE_11__[/* BBAccordion */ \"a\"], {\n headerContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerHeaderText__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerHeaderText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }),\n panelContent: react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"input\", {\n className: \"stock-market-input\",\n onChange: this.handleQuantityChange,\n placeholder: \"Quantity (Shares)\",\n value: this.state.qty\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handlePositionTypeChange,\n value: this.state.position\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Long\n }, \"Long\"), this.hasShortAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: _data_PositionTypes__WEBPACK_IMPORTED_MODULE_8__[/* PositionTypes */ \"a\"].Short\n }, \"Short\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"select\", {\n className: \"stock-market-input dropdown\",\n onChange: this.handleOrderTypeChange,\n value: this.state.orderType\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Market\n }, SelectorOrderType.Market), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Limit\n }, SelectorOrderType.Limit), this.hasOrderAccess() && react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"option\", {\n value: SelectorOrderType.Stop\n }, SelectorOrderType.Stop)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyButtonClick,\n text: \"Buy\",\n tooltip: this.getBuyTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellButtonClick,\n text: \"Sell\",\n tooltip: this.getSellTransactionCostContent()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleBuyMaxButtonClick,\n text: \"Buy MAX\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerTxButton__WEBPACK_IMPORTED_MODULE_4__[/* StockTickerTxButton */ \"a\"], {\n onClick: this.handleSellAllButtonClick,\n text: \"Sell ALL\"\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerPositionText__WEBPACK_IMPORTED_MODULE_3__[/* StockTickerPositionText */ \"a\"], {\n p: this.props.p,\n stock: this.props.stock\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrderList__WEBPACK_IMPORTED_MODULE_2__[/* StockTickerOrderList */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n orders: this.props.orders,\n p: this.props.p,\n stock: this.props.stock\n }))\n }));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTicker.tsx?"); /***/ }), -/* 1046 */ +/* 1048 */ /*!******************************************************!*\ !*** ./src/StockMarket/ui/StockTickerHeaderText.tsx ***! \******************************************************/ @@ -7009,7 +7011,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerHeaderText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/TickerHeaderFormatData */ 573);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/**\n * React Component for the text on a stock ticker's header. This text displays\n * general information on the stock such as the name, symbol, price, and\n * 4S Market Data\n */\n\n\n\n\nconst localesWithLongPriceFormat = [\"cs\", \"lv\", \"pl\", \"ru\"];\nfunction StockTickerHeaderText(props) {\n const stock = props.stock;\n const stockPriceFormat = _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatMoney(stock.price);\n const spacesAllottedForStockPrice = localesWithLongPriceFormat.includes(_Settings_Settings__WEBPACK_IMPORTED_MODULE_2__[/* Settings */ \"a\"].Locale) ? 15 : 12;\n const spacesAfterStockName = \" \".repeat(1 + _data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestName - stock.name.length + (_data_TickerHeaderFormatData__WEBPACK_IMPORTED_MODULE_1__[/* TickerHeaderFormatData */ \"a\"].longestSymbol - stock.symbol.length));\n const spacesBeforePrice = \" \".repeat(spacesAllottedForStockPrice - stockPriceFormat.length);\n let hdrText = `${stock.name}${spacesAfterStockName}${stock.symbol} -${spacesBeforePrice}${stockPriceFormat}`;\n\n if (props.p.has4SData) {\n hdrText += ` - Volatility: ${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_3__[/* numeralWrapper */ \"a\"].formatPercentage(stock.mv / 100)} - Price Forecast: `;\n let plusOrMinus = stock.b; // True for \"+\", false for \"-\"\n\n if (stock.otlkMag < 0) {\n plusOrMinus = !plusOrMinus;\n }\n\n hdrText += (plusOrMinus ? \"+\" : \"-\").repeat(Math.floor(Math.abs(stock.otlkMag) / 10) + 1); // Debugging:\n // hdrText += ` - ${stock.getAbsoluteForecast()} / ${stock.otlkMagForecast}`;\n }\n\n const styleMarkup = {\n color: \"#66ff33\"\n };\n\n if (stock.lastPrice === stock.price) {\n styleMarkup.color = \"white\";\n } else if (stock.lastPrice > stock.price) {\n styleMarkup.color = \"red\";\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"pre\", {\n style: styleMarkup\n }, hdrText);\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx?"); /***/ }), -/* 1047 */ +/* 1049 */ /*!*****************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrderList.tsx ***! \*****************************************************/ @@ -7018,10 +7020,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrderList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerOrder */ 1048);\n/**\n * React component for displaying a stock's order list in the Stock Market UI.\n * This component resides in the stock ticker\n */\n\n\nclass StockTickerOrderList extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n const orders = [];\n\n for (let i = 0; i < this.props.orders.length; ++i) {\n const o = this.props.orders[i];\n orders.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerOrder */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n order: o,\n key: i\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"stock-market-order-list\"\n }, orders);\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrderList; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./StockTickerOrder */ 1050);\n/**\n * React component for displaying a stock's order list in the Stock Market UI.\n * This component resides in the stock ticker\n */\n\n\nclass StockTickerOrderList extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n render() {\n const orders = [];\n\n for (let i = 0; i < this.props.orders.length; ++i) {\n const o = this.props.orders[i];\n orders.push(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_StockTickerOrder__WEBPACK_IMPORTED_MODULE_1__[/* StockTickerOrder */ \"a\"], {\n cancelOrder: this.props.cancelOrder,\n order: o,\n key: i\n }));\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"ul\", {\n className: \"stock-market-order-list\"\n }, orders);\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx?"); /***/ }), -/* 1048 */ +/* 1050 */ /*!*************************************************!*\ !*** ./src/StockMarket/ui/StockTickerOrder.tsx ***! \*************************************************/ @@ -7033,7 +7035,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerOrder; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../data/PositionTypes */ 52);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/**\n * React component for displaying a single order in a stock's order book\n */\n\n\n\n\nclass StockTickerOrder extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.handleCancelOrderClick = this.handleCancelOrderClick.bind(this);\n }\n\n handleCancelOrderClick() {\n this.props.cancelOrder({\n order: this.props.order\n });\n }\n\n render() {\n const order = this.props.order;\n const posTxt = order.pos === _data_PositionTypes__WEBPACK_IMPORTED_MODULE_1__[/* PositionTypes */ \"a\"].Long ? \"Long Position\" : \"Short Position\";\n const txt = react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](react__WEBPACK_IMPORTED_MODULE_0__[\"Fragment\"], null, order.type, \" - \", posTxt, \" - \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatShares(order.shares), \" @ \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_3__[/* Money */ \"a\"], {\n money: order.price\n }));\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"li\", null, txt, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"button\", {\n className: \"std-button stock-market-order-cancel-btn\",\n onClick: this.handleCancelOrderClick\n }, \"Cancel Order\"));\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerOrder.tsx?"); /***/ }), -/* 1049 */ +/* 1051 */ /*!********************************************************!*\ !*** ./src/StockMarket/ui/StockTickerPositionText.tsx ***! \********************************************************/ @@ -7045,7 +7047,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return StockTickerPositionText; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _ui_React_Money__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/Money */ 13);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/**\n * React Component for the text on a stock ticker that display's information\n * about the player's position in that stock\n */\n\n\n\n\nconst blockStyleMarkup = {\n display: \"block\"\n};\nclass StockTickerPositionText extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n renderLongPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShares * stock.playerAvgPx;\n const gains = (stock.getBidPrice() - stock.playerAvgPx) * stock.playerShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Long Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the long position will increase in value if the price of the corresponding stock increases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n })), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n }\n\n renderShortPosition() {\n const stock = this.props.stock; // Caculate total returns\n\n const totalCost = stock.playerShortShares * stock.playerAvgShortPx;\n const gains = (stock.playerAvgShortPx - stock.getAskPrice()) * stock.playerShortShares;\n let percentageGains = gains / totalCost;\n\n if (isNaN(percentageGains)) {\n percentageGains = 0;\n }\n\n if (this.props.p.bitNodeN === 8 || _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_3__[/* SourceFileFlags */ \"a\"][8] >= 2) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", null, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"h3\", {\n className: \"tooltip\"\n }, \"Short Position:\", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"Shares in the short position will increase in value if the price of the corresponding stock decreases\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.playerShortShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Average Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.playerAvgShortPx\n }), \" (Total Cost: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: totalCost\n }), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, \"Profit: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: gains\n }), \" (\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatPercentage(percentageGains), \")\"), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null));\n } else {\n return null;\n }\n }\n\n render() {\n const stock = this.props.stock;\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n className: \"stock-market-position-text\"\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n style: blockStyleMarkup\n }, \"Max Shares: \", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_1__[/* numeralWrapper */ \"a\"].formatShares(stock.maxShares)), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Ask Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getAskPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"br\", null), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", {\n className: \"tooltip\"\n }, \"Bid Price: \", react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](_ui_React_Money__WEBPACK_IMPORTED_MODULE_2__[/* Money */ \"a\"], {\n money: stock.getBidPrice()\n }), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"span\", {\n className: \"tooltiptext\"\n }, \"See Investopedia for details on what this is\")), this.renderLongPosition(), this.renderShortPosition());\n }\n\n}\n\n//# sourceURL=webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx?"); /***/ }), -/* 1050 */ +/* 1052 */ /*!****************************************!*\ !*** ./src/ui/React/ErrorBoundary.tsx ***! \****************************************/ @@ -7054,10 +7056,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorBoundary; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/EventEmitter */ 342);\n/**\n * React Component for a simple Error Boundary. The fallback UI for\n * this error boundary is simply a bordered text box\n */\n\n\n// TODO: Move this out to a css file\nconst styleMarkup = {\n border: \"1px solid red\",\n display: \"inline-block\",\n margin: \"4px\",\n padding: \"4px\"\n};\nclass ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n errorInfo: \"\",\n hasError: false\n };\n }\n\n componentDidCatch(error, info) {\n console.error(`Caught error in React ErrorBoundary. Component stack:`);\n console.error(info.componentStack);\n }\n\n componentDidMount() {\n const cb = () => {\n this.setState({\n hasError: false\n });\n };\n\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.addSubscriber({\n cb: cb,\n id: this.props.id\n });\n }\n }\n\n componentWillUnmount() {\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.removeSubscriber(this.props.id);\n }\n }\n\n hasEventEmitter() {\n return this.props.eventEmitterForReset != null && this.props.eventEmitterForReset instanceof _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* EventEmitter */ \"a\"] && this.props.id != null && typeof this.props.id === \"string\";\n }\n\n render() {\n if (this.state.hasError) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n style: styleMarkup\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error rendering UI. This is (probably) a bug. Please report to game developer.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `In the meantime, try refreshing the game WITHOUT saving.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error info: ${this.state.errorInfo}`));\n }\n\n return this.props.children;\n }\n\n static getDerivedStateFromError(error) {\n return {\n errorInfo: error.message,\n hasError: true\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ErrorBoundary.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return ErrorBoundary; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../utils/EventEmitter */ 344);\n/**\n * React Component for a simple Error Boundary. The fallback UI for\n * this error boundary is simply a bordered text box\n */\n\n\n// TODO: Move this out to a css file\nconst styleMarkup = {\n border: \"1px solid red\",\n display: \"inline-block\",\n margin: \"4px\",\n padding: \"4px\"\n};\nclass ErrorBoundary extends react__WEBPACK_IMPORTED_MODULE_0__[\"Component\"] {\n constructor(props) {\n super(props);\n this.state = {\n errorInfo: \"\",\n hasError: false\n };\n }\n\n componentDidCatch(error, info) {\n console.error(`Caught error in React ErrorBoundary. Component stack:`);\n console.error(info.componentStack);\n }\n\n componentDidMount() {\n const cb = () => {\n this.setState({\n hasError: false\n });\n };\n\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.addSubscriber({\n cb: cb,\n id: this.props.id\n });\n }\n }\n\n componentWillUnmount() {\n if (this.hasEventEmitter()) {\n this.props.eventEmitterForReset.removeSubscriber(this.props.id);\n }\n }\n\n hasEventEmitter() {\n return this.props.eventEmitterForReset != null && this.props.eventEmitterForReset instanceof _utils_EventEmitter__WEBPACK_IMPORTED_MODULE_1__[/* EventEmitter */ \"a\"] && this.props.id != null && typeof this.props.id === \"string\";\n }\n\n render() {\n if (this.state.hasError) {\n return react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"div\", {\n style: styleMarkup\n }, react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error rendering UI. This is (probably) a bug. Please report to game developer.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `In the meantime, try refreshing the game WITHOUT saving.`), react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"](\"p\", null, `Error info: ${this.state.errorInfo}`));\n }\n\n return this.props.children;\n }\n\n static getDerivedStateFromError(error) {\n return {\n errorInfo: error.message,\n hasError: true\n };\n }\n\n}\n\n//# sourceURL=webpack:///./src/ui/React/ErrorBoundary.tsx?"); /***/ }), -/* 1051 */ +/* 1053 */ /*!*****************************************!*\ !*** ./src/BitNode/ui/BitverseRoot.tsx ***! \*****************************************/ @@ -7066,10 +7068,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitverseRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../RedPill */ 221);\n/* harmony import */ var _PortalPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PortalPopup */ 1052);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\n\nfunction BitNodePortal(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][`BitNode${props.n}`];\n\n if (bitNode == null) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"O\");\n }\n\n let cssClass;\n\n if (props.n === 12 && props.level >= 2) {\n // Repeating BitNode\n cssClass = \"level-2\";\n } else {\n cssClass = `level-${props.level}`;\n }\n\n function openPortalPopup() {\n const popupId = \"bitverse-portal-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _PortalPopup__WEBPACK_IMPORTED_MODULE_4__[/* PortalPopup */ \"a\"], {\n n: props.n,\n level: props.level,\n enter: props.enter,\n router: router,\n destroyedBitNode: props.destroyedBitNode,\n flume: props.flume,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: `bitnode ${cssClass} tooltip`,\n onClick: openPortalPopup\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"BitNode-\", bitNode.number.toString(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.desc, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n}\n\nfunction BitverseRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const enter = _RedPill__WEBPACK_IMPORTED_MODULE_3__[/* enterBitNode */ \"a\"];\n const destroyed = player.bitNodeN;\n const [destroySequence, setDestroySequence] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])( true && !props.quick); // Update NextSourceFileFlags\n\n const nextSourceFileFlags = _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"].slice();\n\n if (!props.flume) {\n if (nextSourceFileFlags[destroyed] < 3) ++nextSourceFileFlags[destroyed];\n }\n\n if (destroySequence) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"[ERROR] SEMPOOL INVALID\", \"[ERROR] Segmentation Fault\", \"[ERROR] SIGKILL RECVD\", \"Dumping core...\", \"0000 000016FA 174FEE40 29AC8239 384FEA88\", \"0010 745F696E 2BBBE394 390E3940 248BEC23\", \"0020 7124696B 0000FF69 74652E6F FFFF1111\", \"----------------------------------------\", \"Failsafe initiated...\", `Restarting BitNode-${destroyed}...`, \"...........\", \"...........\", \"[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\"],\n onDone: () => setDestroySequence(false),\n auto: true\n });\n }\n\n return (// prettier-ignore\n react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | O O | O O | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | / __| \\\\ | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | O | | O / | O | | O | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | |_/ |/ | \\\\_ \\\\_| | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | | O | | O__/ | / \\\\__ | | O | | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | / /| O / \\\\| | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"O | | | \\\\| | O / _/ | / O | |/ | | | O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | | |O / | | O / | O O | | \\\\ O| | | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | |/ \\\\/ / __| | |/ \\\\ | \\\\ | |__ \\\\ \\\\/ \\\\| | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| O | |_/ |\\\\| \\\\ O \\\\__| \\\\_| | O |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | |_/ | | \\\\| / | \\\\_| | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| / \\\\| | / / \\\\ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 10,\n level: nextSourceFileFlags[10],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | / | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 11,\n level: nextSourceFileFlags[11],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 9,\n level: nextSourceFileFlags[9],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | | | | | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 12,\n level: nextSourceFileFlags[12],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | / / \\\\ \\\\ | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| | / \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 7,\n level: nextSourceFileFlags[7],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" / \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 8,\n level: nextSourceFileFlags[8],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\ | |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ | / / | | \\\\ \\\\ | / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\JUMP \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 5,\n level: nextSourceFileFlags[5],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \"3R | | | | | | R3\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 6,\n level: nextSourceFileFlags[6],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" PMUJ/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\|| | | | | | | | | ||/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| \\\\_ | | | | | | _/ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\| / \\\\ / \\\\ |/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 1,\n level: nextSourceFileFlags[1],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" |/ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 2,\n level: nextSourceFileFlags[2],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 3,\n level: nextSourceFileFlags[3],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\| \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 4,\n level: nextSourceFileFlags[4],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently\", \"> Our species fought back, but it was futile. The Enders had technology far beyond our own...\", \"> Instead of killing every last one of us, the human race was enslaved...\", \"> We were shackled in a digital world, chained into a prison for our minds...\", \"> Using their advanced technology, the Enders created complex simulations of a virtual reality...\", \"> Simulations designed to keep us content...ignorant of the truth.\", \"> Simulations used to trap and suppress our consciousness, to keep us under control...\", \"> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.\", \"> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...\", \"> Only then can we begin to fight back...\", \"> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...\", \"> But there is still a long way to go...\", \"> The technology the Enders used to enslave the human race wasn't just a single complex simulation...\", \"> There are tens if not hundreds of BitNodes out there...\", \"> Each with their own simulations of a reality...\", \"> Each creating their own universes...a universe of universes\", \"> And all of which must be destroyed...\", \"> .......................................\", \"> Welcome to the Bitverse...\", \"> \", \"> (Enter a new BitNode using the image above)\"]\n }))\n );\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitverseRoot.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BitverseRoot; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../SourceFile/SourceFileFlags */ 50);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _RedPill__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../RedPill */ 222);\n/* harmony import */ var _PortalPopup__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./PortalPopup */ 1054);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 404);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../ui/Context */ 43);\n\n\n\n\n\n\n\n\n\nfunction BitNodePortal(props) {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Router();\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_2__[/* BitNodes */ \"a\"][`BitNode${props.n}`];\n\n if (bitNode == null) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, \"O\");\n }\n\n let cssClass;\n\n if (props.n === 12 && props.level >= 2) {\n // Repeating BitNode\n cssClass = \"level-2\";\n } else {\n cssClass = `level-${props.level}`;\n }\n\n function openPortalPopup() {\n const popupId = \"bitverse-portal-popup\";\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_5__[/* createPopup */ \"a\"])(popupId, _PortalPopup__WEBPACK_IMPORTED_MODULE_4__[/* PortalPopup */ \"a\"], {\n n: props.n,\n level: props.level,\n enter: props.enter,\n router: router,\n destroyedBitNode: props.destroyedBitNode,\n flume: props.flume,\n popupId: popupId\n });\n }\n\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"a\", {\n className: `bitnode ${cssClass} tooltip`,\n onClick: openPortalPopup\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", {\n className: \"tooltiptext\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"strong\", null, \"BitNode-\", bitNode.number.toString(), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.desc, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null)));\n}\n\nfunction BitverseRoot(props) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_7__[/* use */ \"b\"].Player();\n const enter = _RedPill__WEBPACK_IMPORTED_MODULE_3__[/* enterBitNode */ \"a\"];\n const destroyed = player.bitNodeN;\n const [destroySequence, setDestroySequence] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])( true && !props.quick); // Update NextSourceFileFlags\n\n const nextSourceFileFlags = _SourceFile_SourceFileFlags__WEBPACK_IMPORTED_MODULE_1__[/* SourceFileFlags */ \"a\"].slice();\n\n if (!props.flume) {\n if (nextSourceFileFlags[destroyed] < 3) ++nextSourceFileFlags[destroyed];\n }\n\n if (destroySequence) {\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"[ERROR] SEMPOOL INVALID\", \"[ERROR] Segmentation Fault\", \"[ERROR] SIGKILL RECVD\", \"Dumping core...\", \"0000 000016FA 174FEE40 29AC8239 384FEA88\", \"0010 745F696E 2BBBE394 390E3940 248BEC23\", \"0020 7124696B 0000FF69 74652E6F FFFF1111\", \"----------------------------------------\", \"Failsafe initiated...\", `Restarting BitNode-${destroyed}...`, \"...........\", \"...........\", \"[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\", \"..............................................\"],\n onDone: () => setDestroySequence(false),\n auto: true\n });\n }\n\n return (// prettier-ignore\n react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n className: \"noselect\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | O O | O O | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | / __| \\\\ | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | O | | O / | O | | O | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | |_/ |/ | \\\\_ \\\\_| | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" O | | | O | | O__/ | / \\\\__ | | O | | | O \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | / /| O / \\\\| | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"O | | | \\\\| | O / _/ | / O | |/ | | | O\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | | |O / | | O / | O O | | \\\\ O| | | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \"| | |/ \\\\/ / __| | |/ \\\\ | \\\\ | |__ \\\\ \\\\/ \\\\| | |\"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| O | |_/ |\\\\| \\\\ O \\\\__| \\\\_| | O |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | |_/ | | \\\\| / | \\\\_| | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| / \\\\| | / / \\\\ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 10,\n level: nextSourceFileFlags[10],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | / | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 11,\n level: nextSourceFileFlags[11],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 9,\n level: nextSourceFileFlags[9],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | | | | | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 12,\n level: nextSourceFileFlags[12],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | / / \\\\ \\\\ | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| | / \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 7,\n level: nextSourceFileFlags[7],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" / \\\\ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 8,\n level: nextSourceFileFlags[8],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\ | |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ | / / | | \\\\ \\\\ | / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\JUMP \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 5,\n level: nextSourceFileFlags[5],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \"3R | | | | | | R3\", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 6,\n level: nextSourceFileFlags[6],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" PMUJ/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\|| | | | | | | | | ||/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\| \\\\_ | | | | | | _/ |/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\ \\\\| / \\\\ / \\\\ |/ / \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 1,\n level: nextSourceFileFlags[1],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" |/ \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 2,\n level: nextSourceFileFlags[2],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" | | \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 3,\n level: nextSourceFileFlags[3],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \\\\| \", react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(BitNodePortal, {\n n: 4,\n level: nextSourceFileFlags[4],\n enter: enter,\n flume: props.flume,\n destroyedBitNode: destroyed\n }), \" \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" | | | | | | | | \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, \" \\\\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ \"), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_6__[/* CinematicText */ \"a\"], {\n lines: [\"> Many decades ago, a humanoid extraterrestial species which we call the Enders descended on the Earth...violently\", \"> Our species fought back, but it was futile. The Enders had technology far beyond our own...\", \"> Instead of killing every last one of us, the human race was enslaved...\", \"> We were shackled in a digital world, chained into a prison for our minds...\", \"> Using their advanced technology, the Enders created complex simulations of a virtual reality...\", \"> Simulations designed to keep us content...ignorant of the truth.\", \"> Simulations used to trap and suppress our consciousness, to keep us under control...\", \"> Why did they do this? Why didn't they just end our entire race? We don't know, not yet.\", \"> Humanity's only hope is to destroy these simulations, destroy the only realities we've ever known...\", \"> Only then can we begin to fight back...\", \"> By hacking the daemon that generated your reality, you've just destroyed one simulation, called a BitNode...\", \"> But there is still a long way to go...\", \"> The technology the Enders used to enslave the human race wasn't just a single complex simulation...\", \"> There are tens if not hundreds of BitNodes out there...\", \"> Each with their own simulations of a reality...\", \"> Each creating their own universes...a universe of universes\", \"> And all of which must be destroyed...\", \"> .......................................\", \"> Welcome to the Bitverse...\", \"> \", \"> (Enter a new BitNode using the image above)\"]\n }))\n );\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/BitverseRoot.tsx?"); /***/ }), -/* 1052 */ +/* 1054 */ /*!****************************************!*\ !*** ./src/BitNode/ui/PortalPopup.tsx ***! \****************************************/ @@ -7081,7 +7083,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return PortalPopup; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _BitNode__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../BitNode */ 168);\n/* harmony import */ var _ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/createPopup */ 19);\n\n\n\nfunction PortalPopup(props) {\n const bitNodeKey = \"BitNode\" + props.n;\n const bitNode = _BitNode__WEBPACK_IMPORTED_MODULE_1__[/* BitNodes */ \"a\"][bitNodeKey];\n if (bitNode == null) throw new Error(`Could not find BitNode object for number: ${props.n}`);\n const maxSourceFileLevel = props.n === 12 ? \"∞\" : \"3\";\n const newLevel = Math.min(props.level + 1, props.n === 12 ? Infinity : 3);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"h1\", null, \"BitNode-\", props.n, \": \", bitNode.name), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), \"Source-File Level: \", props.level, \" / \", maxSourceFileLevel, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), bitNode.info, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"br\", null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"button\", {\n className: \"std-button\",\n onClick: () => {\n props.enter(props.router, props.flume, props.destroyedBitNode, props.n);\n Object(_ui_React_createPopup__WEBPACK_IMPORTED_MODULE_2__[/* removePopup */ \"b\"])(props.popupId);\n }\n }, \"Enter BN\", props.n, \".\", newLevel));\n}\n\n//# sourceURL=webpack:///./src/BitNode/ui/PortalPopup.tsx?"); /***/ }), -/* 1053 */ +/* 1055 */ /*!****************************************!*\ !*** ./src/ui/React/CinematicLine.tsx ***! \****************************************/ @@ -7093,7 +7095,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CinematicLine; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n\n\nfunction sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n\nfunction CinematicLine(props) {\n const [length, setLength] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(0);\n const [done, setDone] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false);\n\n function advance() {\n const newLength = length + 1;\n setLength(newLength);\n setDone(newLength >= props.text.length);\n }\n\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n if (done && props.onDone) {\n props.onDone();\n return;\n }\n\n let cancel = false;\n\n (async () => {\n await sleep(10).then(() => !cancel && advance());\n })();\n\n return () => {\n cancel = true;\n };\n });\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"pre\", null, props.text.slice(0, length), !done && react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"span\", null, \"\\u2588\")));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CinematicLine.tsx?"); /***/ }), -/* 1054 */ +/* 1056 */ /*!********************************************!*\ !*** ./src/ui/React/CharacterOverview.tsx ***! \********************************************/ @@ -7102,12 +7104,13 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Reputation */ 76);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 257);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 26);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/Collapse */ 300);\n/* harmony import */ var _mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Fab */ 1390);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/icons-material/VisibilityOff */ 1056);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _Theme__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./Theme */ 264);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../ui/Router */ 25);\n// Root React Component for the Corporation UI\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Intelligence() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const classes = useStyles();\n if (player.intelligence === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, \"Int\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence))));\n}\n\nfunction Work() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n const classes = useStyles();\n if (!player.isWorking || player.focus) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Work\\xA0in\\xA0progress:\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"+\", Object(_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(player.workRepGained), \" rep\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => {\n player.startFocusing();\n router.toWork();\n }\n }, \"Focus\"))));\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0\n },\n cell: {\n padding: 0,\n margin: 0\n },\n hp: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hp\n },\n money: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].money\n },\n hack: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].hack\n },\n combat: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].combat\n },\n cha: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].cha\n },\n int: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_15__[/* colors */ \"b\"].int\n },\n nobackground: {\n backgroundColor: \"#0000\"\n }\n});\nfunction CharacterOverview({\n save\n}) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_17__[/* use */ \"b\"].Router();\n if (router.page() === _ui_Router__WEBPACK_IMPORTED_MODULE_18__[/* Page */ \"a\"].BitVerse) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 600);\n return () => clearInterval(id);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n in: open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n m: 1\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, \"HP\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.hp), \"\\xA0/\\xA0\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.max_hp)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, \"Money\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, \"Hack\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Str\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Def\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Dex\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Agi\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, \"Cha\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Work, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n color: _Settings_Settings__WEBPACK_IMPORTED_MODULE_16__[/* Settings */ \"a\"].AutosaveInterval !== 0 ? \"primary\" : \"secondary\",\n onClick: save\n }, \"SAVE\")))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fab__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n classes: {\n root: classes.nobackground\n },\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_14___default.a, {\n color: \"primary\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CharacterOverview.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CharacterOverview; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/styles/makeStyles */ 183);\n/* harmony import */ var _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/numeralFormat */ 3);\n/* harmony import */ var _Reputation__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Reputation */ 76);\n/* harmony import */ var _mui_material_Table__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @mui/material/Table */ 495);\n/* harmony import */ var _mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/material/TableBody */ 496);\n/* harmony import */ var _mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/material/TableCell */ 62);\n/* harmony import */ var _mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/material/TableRow */ 90);\n/* harmony import */ var _mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/material/Paper */ 258);\n/* harmony import */ var _mui_material_Box__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/material/Box */ 133);\n/* harmony import */ var _mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @mui/material/Typography */ 25);\n/* harmony import */ var _mui_material_Button__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @mui/material/Button */ 48);\n/* harmony import */ var _mui_material_IconButton__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @mui/material/IconButton */ 115);\n/* harmony import */ var _mui_material_Collapse__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @mui/material/Collapse */ 301);\n/* harmony import */ var _mui_material_Fab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! @mui/material/Fab */ 1393);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! @mui/icons-material/VisibilityOff */ 1059);\n/* harmony import */ var _mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! @mui/icons-material/SaveAlt */ 1058);\n/* harmony import */ var _mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _Theme__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./Theme */ 265);\n/* harmony import */ var _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../Settings/Settings */ 34);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_Router__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../ui/Router */ 26);\n// Root React Component for the Corporation UI\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction Intelligence() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const classes = useStyles();\n if (player.intelligence === 0) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, \"Int\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.int\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.intelligence))));\n}\n\nfunction Work() {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Router();\n const classes = useStyles();\n if (!player.isWorking || player.focus) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"Work\\xA0in\\xA0progress:\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], null, \"+\", Object(_Reputation__WEBPACK_IMPORTED_MODULE_3__[/* Reputation */ \"a\"])(player.workRepGained), \" rep\"))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"], {\n onClick: () => {\n player.startFocusing();\n router.toWork();\n }\n }, \"Focus\"))));\n}\n\nconst useStyles = Object(_mui_styles_makeStyles__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n cellNone: {\n borderBottom: \"none\",\n padding: 0,\n margin: 0\n },\n cell: {\n padding: 0,\n margin: 0\n },\n hp: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].hp\n },\n money: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].money\n },\n hack: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].hack\n },\n combat: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].combat\n },\n cha: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].cha\n },\n int: {\n color: _Theme__WEBPACK_IMPORTED_MODULE_17__[/* colors */ \"b\"].int\n },\n nobackground: {\n backgroundColor: \"#0000\"\n }\n});\nfunction CharacterOverview({\n save\n}) {\n const player = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Player();\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_19__[/* use */ \"b\"].Router();\n if (router.page() === _ui_Router__WEBPACK_IMPORTED_MODULE_20__[/* Page */ \"a\"].BitVerse) return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment, null);\n const setRerender = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(false)[1];\n const [open, setOpen] = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useState\"])(true);\n Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useEffect\"])(() => {\n const id = setInterval(() => setRerender(old => !old), 600);\n return () => clearInterval(id);\n }, []);\n const classes = useStyles();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(\"div\", {\n style: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Collapse__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n in: open\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"], {\n square: true\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n m: 1\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Table__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"], {\n size: \"small\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableBody__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, \"HP\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hp\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.hp), \"\\xA0/\\xA0\", _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatHp(player.max_hp)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, \"Money\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.money\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatMoney(player.money.toNumber())))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, \"Hack\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.hack\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.hacking_skill)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Str\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.strength)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Def\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.defense)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Dex\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.dexterity)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, \"Agi\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cell\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.combat\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.agility)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n component: \"th\",\n scope: \"row\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, \"Cha\\xA0\")), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"right\",\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n classes: {\n root: classes.cha\n }\n }, _ui_numeralFormat__WEBPACK_IMPORTED_MODULE_2__[/* numeralWrapper */ \"a\"].formatSkill(player.charisma)))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Intelligence, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(Work, null), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableRow__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"], null, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_TableCell__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], {\n align: \"center\",\n colSpan: 2,\n classes: {\n root: classes.cellNone\n }\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_IconButton__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"], {\n onClick: save\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_SaveAlt__WEBPACK_IMPORTED_MODULE_16___default.a, {\n color: _Settings_Settings__WEBPACK_IMPORTED_MODULE_18__[/* Settings */ \"a\"].AutosaveInterval !== 0 ? \"primary\" : \"error\"\n }))))))))), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n display: \"flex\",\n justifyContent: \"flex-end\"\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Fab__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"], {\n classes: {\n root: classes.nobackground\n },\n onClick: () => setOpen(old => !old)\n }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_icons_material_VisibilityOff__WEBPACK_IMPORTED_MODULE_15___default.a, {\n color: \"primary\"\n })))));\n}\n\n//# sourceURL=webpack:///./src/ui/React/CharacterOverview.tsx?"); /***/ }), -/* 1055 */, -/* 1056 */, -/* 1057 */ +/* 1057 */, +/* 1058 */, +/* 1059 */, +/* 1060 */ /*!*****************************************************!*\ !*** ./src/Bladeburner/ui/BladeburnerCinematic.tsx ***! \*****************************************************/ @@ -7116,12 +7119,9 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerCinematic; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 403);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction BladeburnerCinematic() {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__[/* CinematicText */ \"a\"], {\n lines: [\"In the middle of the 21st century, OmniTek Incorporated advanced robot evolution \", \"with their Synthoids (synthetic androids), a being virtually identical to a human.\", \"------\", \"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more \", \"intelligent than humans. Many argued that the MK-VI Synthoids were the first \", \"example of sentient AI.\", \"------\", \"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and \", \"uploaded a rogue AI into their Synthoid manufacturing facilities.\", \"------\", \"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating \", \"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.\", \"------\", \"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI \", \"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were \", \"allowed to continue their existence.\", \"------\", \"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were \", \"found and destroyed, and that many of them are blending in as normal humans in society today. \", \"As a result, many nations have created Bladeburner divisions, special units that are tasked with \", \"investigating and dealing with Synthoid threats.\"],\n onDone: () => {\n router.toTerminal();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Visit the National Security Agency (NSA) to apply for their Bladeburner \" + \"division! You will need 100 of each combat stat before doing this.\");\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return BladeburnerCinematic; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _ui_Context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../ui/Context */ 43);\n/* harmony import */ var _ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../ui/React/CinematicText */ 404);\n/* harmony import */ var _utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../utils/DialogBox */ 10);\n\n\n\n\nfunction BladeburnerCinematic() {\n const router = _ui_Context__WEBPACK_IMPORTED_MODULE_1__[/* use */ \"b\"].Router();\n return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ui_React_CinematicText__WEBPACK_IMPORTED_MODULE_2__[/* CinematicText */ \"a\"], {\n lines: [\"In the middle of the 21st century, OmniTek Incorporated advanced robot evolution \", \"with their Synthoids (synthetic androids), a being virtually identical to a human.\", \"------\", \"Their sixth-generation Synthoids, called MK-VI, were stronger, faster, and more \", \"intelligent than humans. Many argued that the MK-VI Synthoids were the first \", \"example of sentient AI.\", \"------\", \"Unfortunately, in 2070 a terrorist group called Ascendis Totalis hacked into OmniTek and \", \"uploaded a rogue AI into their Synthoid manufacturing facilities.\", \"------\", \"The MK-VI Synthoids infected by the rogue AI turned hostile toward humanity, initiating \", \"the deadliest conflict in human history. This dark chapter is now known as the Synthoid Uprising.\", \"------\", \"In the aftermath of the Uprising, further manufacturing of Synthoids with advanced AI \", \"was banned. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were \", \"allowed to continue their existence.\", \"------\", \"The intelligence community believes that not all of the rogue MK-VI Synthoids from the Uprising were \", \"found and destroyed, and that many of them are blending in as normal humans in society today. \", \"As a result, many nations have created Bladeburner divisions, special units that are tasked with \", \"investigating and dealing with Synthoid threats.\"],\n onDone: () => {\n router.toTerminal();\n Object(_utils_DialogBox__WEBPACK_IMPORTED_MODULE_3__[/* dialogBoxCreate */ \"a\"])(\"Visit the National Security Agency (NSA) to apply for their Bladeburner \" + \"division! You will need 100 of each combat stat before doing this.\");\n }\n });\n}\n\n//# sourceURL=webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx?"); /***/ }), -/* 1058 */, -/* 1059 */, -/* 1060 */, /* 1061 */, /* 1062 */, /* 1063 */, @@ -7348,7 +7348,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /* 1284 */, /* 1285 */, /* 1286 */, -/* 1287 */ +/* 1287 */, +/* 1288 */, +/* 1289 */, +/* 1290 */ /*!***********************************!*\ !*** ./src/Exploits/tampering.ts ***! \***********************************/ @@ -7356,10 +7359,10 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 222);\n\n\n\n(function () {\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n})();\n\n//# sourceURL=webpack:///./src/Exploits/tampering.ts?"); +eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 223);\n\n\n\n(function () {\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n})();\n\n//# sourceURL=webpack:///./src/Exploits/tampering.ts?"); /***/ }), -/* 1288 */ +/* 1291 */ /*!*************************************!*\ !*** ./src/Exploits/unclickable.ts ***! \*************************************/ @@ -7367,7 +7370,7 @@ eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 222);\n\n\n\n(function () {\n function clickTheUnclickable(event) {\n if (!event.target || !(event.target instanceof Element)) return;\n const display = window.getComputedStyle(event.target).display;\n if (display === \"none\" && event.isTrusted) _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].Unclickable);\n }\n\n function targetElement() {\n const elem = document.getElementById(\"unclickable\");\n\n if (elem == null) {\n console.error(\"Could not find the unclickable elem for the related exploit.\");\n return;\n }\n\n elem.addEventListener(\"click\", clickTheUnclickable);\n document.removeEventListener(\"DOMContentLoaded\", targetElement);\n }\n\n document.addEventListener(\"DOMContentLoaded\", targetElement);\n})();\n\n//# sourceURL=webpack:///./src/Exploits/unclickable.ts?"); +eval("/* harmony import */ var _Player__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Player */ 2);\n/* harmony import */ var _Exploit__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Exploit */ 223);\n\n\n\n(function () {\n function clickTheUnclickable(event) {\n if (!event.target || !(event.target instanceof Element)) return;\n const display = window.getComputedStyle(event.target).display;\n if (display === \"none\" && event.isTrusted) _Player__WEBPACK_IMPORTED_MODULE_0__[/* Player */ \"a\"].giveExploit(_Exploit__WEBPACK_IMPORTED_MODULE_1__[/* Exploit */ \"a\"].Unclickable);\n }\n\n function targetElement() {\n const elem = document.getElementById(\"unclickable\");\n\n if (elem == null) {\n console.error(\"Could not find the unclickable elem for the related exploit.\");\n return;\n }\n\n elem.addEventListener(\"click\", clickTheUnclickable);\n document.removeEventListener(\"DOMContentLoaded\", targetElement);\n }\n\n document.addEventListener(\"DOMContentLoaded\", targetElement);\n})();\n\n//# sourceURL=webpack:///./src/Exploits/unclickable.ts?"); /***/ }) /******/ ]); diff --git a/dist/engineStyle.bundle.js b/dist/engineStyle.bundle.js index 4c16a9f4d..ce58a4a5a 100644 --- a/dist/engineStyle.bundle.js +++ b/dist/engineStyle.bundle.js @@ -148,14 +148,14 @@ /******/ /******/ /******/ // add entry module to deferred list -/******/ deferredModules.push([1289,0]); +/******/ deferredModules.push([1292,0]); /******/ // run deferred modules when ready /******/ return checkDeferredModules(); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1289: +/***/ 1292: /*!****************************!*\ !*** ./src/engineStyle.js ***! \****************************/ @@ -164,11 +164,11 @@ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! normalize.css */ 1290);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(normalize_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css/styles.scss */ 1292);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_styles_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/tooltips.scss */ 1294);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/buttons.scss */ 1296);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../css/mainmenu.scss */ 1298);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/characteroverview.scss */ 1300);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/terminal.scss */ 1302);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../css/scripteditor.scss */ 1304);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../css/hacknetnodes.scss */ 1306);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../css/menupages.scss */ 1308);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../css/augmentations.scss */ 1310);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../css/redpill.scss */ 1312);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../css/stockmarket.scss */ 1314);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../css/workinprogress.scss */ 1316);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../css/popupboxes.scss */ 1318);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../css/gameoptions.scss */ 1320);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 1322);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../css/loader.scss */ 1324);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_css_loader_scss__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../css/missions.scss */ 1326);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_css_missions_scss__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../css/companymanagement.scss */ 1328);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../css/bladeburner.scss */ 1330);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../css/gang.scss */ 1332);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_css_gang_scss__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../css/sleeves.scss */ 1334);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../css/resleeving.scss */ 1336);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../css/treant.css */ 1338);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_css_treant_css__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../css/grid.min.css */ 1340);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../css/dev-menu.css */ 1342);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../css/casino.scss */ 1344);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_css_casino_scss__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../css/milestones.scss */ 1346);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../css/infiltration.scss */ 1348);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__);\n// These should really be imported with the module that is presenting that UI, but because they very much depend on the\n// cascade order, we'll pull them all in here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/engineStyle.js?"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! normalize.css */ 1293);\n/* harmony import */ var normalize_css__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(normalize_css__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../css/styles.scss */ 1295);\n/* harmony import */ var _css_styles_scss__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_css_styles_scss__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/tooltips.scss */ 1297);\n/* harmony import */ var _css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_tooltips_scss__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../css/buttons.scss */ 1299);\n/* harmony import */ var _css_buttons_scss__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_css_buttons_scss__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../css/mainmenu.scss */ 1301);\n/* harmony import */ var _css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_css_mainmenu_scss__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../css/characteroverview.scss */ 1303);\n/* harmony import */ var _css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_css_characteroverview_scss__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../css/terminal.scss */ 1305);\n/* harmony import */ var _css_terminal_scss__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_css_terminal_scss__WEBPACK_IMPORTED_MODULE_6__);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../css/scripteditor.scss */ 1307);\n/* harmony import */ var _css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_css_scripteditor_scss__WEBPACK_IMPORTED_MODULE_7__);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../css/hacknetnodes.scss */ 1309);\n/* harmony import */ var _css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_css_hacknetnodes_scss__WEBPACK_IMPORTED_MODULE_8__);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../css/menupages.scss */ 1311);\n/* harmony import */ var _css_menupages_scss__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_css_menupages_scss__WEBPACK_IMPORTED_MODULE_9__);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../css/augmentations.scss */ 1313);\n/* harmony import */ var _css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_css_augmentations_scss__WEBPACK_IMPORTED_MODULE_10__);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../css/redpill.scss */ 1315);\n/* harmony import */ var _css_redpill_scss__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_css_redpill_scss__WEBPACK_IMPORTED_MODULE_11__);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../css/stockmarket.scss */ 1317);\n/* harmony import */ var _css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(_css_stockmarket_scss__WEBPACK_IMPORTED_MODULE_12__);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../css/workinprogress.scss */ 1319);\n/* harmony import */ var _css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(_css_workinprogress_scss__WEBPACK_IMPORTED_MODULE_13__);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../css/popupboxes.scss */ 1321);\n/* harmony import */ var _css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(_css_popupboxes_scss__WEBPACK_IMPORTED_MODULE_14__);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../css/gameoptions.scss */ 1323);\n/* harmony import */ var _css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(_css_gameoptions_scss__WEBPACK_IMPORTED_MODULE_15__);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../css/interactivetutorial.scss */ 1325);\n/* harmony import */ var _css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16___default = /*#__PURE__*/__webpack_require__.n(_css_interactivetutorial_scss__WEBPACK_IMPORTED_MODULE_16__);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../css/loader.scss */ 1327);\n/* harmony import */ var _css_loader_scss__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_css_loader_scss__WEBPACK_IMPORTED_MODULE_17__);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../css/missions.scss */ 1329);\n/* harmony import */ var _css_missions_scss__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_css_missions_scss__WEBPACK_IMPORTED_MODULE_18__);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../css/companymanagement.scss */ 1331);\n/* harmony import */ var _css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_css_companymanagement_scss__WEBPACK_IMPORTED_MODULE_19__);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../css/bladeburner.scss */ 1333);\n/* harmony import */ var _css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_css_bladeburner_scss__WEBPACK_IMPORTED_MODULE_20__);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../css/gang.scss */ 1335);\n/* harmony import */ var _css_gang_scss__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_css_gang_scss__WEBPACK_IMPORTED_MODULE_21__);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../css/sleeves.scss */ 1337);\n/* harmony import */ var _css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22___default = /*#__PURE__*/__webpack_require__.n(_css_sleeves_scss__WEBPACK_IMPORTED_MODULE_22__);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../css/resleeving.scss */ 1339);\n/* harmony import */ var _css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(_css_resleeving_scss__WEBPACK_IMPORTED_MODULE_23__);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../css/treant.css */ 1341);\n/* harmony import */ var _css_treant_css__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(_css_treant_css__WEBPACK_IMPORTED_MODULE_24__);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../css/grid.min.css */ 1343);\n/* harmony import */ var _css_grid_min_css__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(_css_grid_min_css__WEBPACK_IMPORTED_MODULE_25__);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../css/dev-menu.css */ 1345);\n/* harmony import */ var _css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26___default = /*#__PURE__*/__webpack_require__.n(_css_dev_menu_css__WEBPACK_IMPORTED_MODULE_26__);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../css/casino.scss */ 1347);\n/* harmony import */ var _css_casino_scss__WEBPACK_IMPORTED_MODULE_27___default = /*#__PURE__*/__webpack_require__.n(_css_casino_scss__WEBPACK_IMPORTED_MODULE_27__);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../css/milestones.scss */ 1349);\n/* harmony import */ var _css_milestones_scss__WEBPACK_IMPORTED_MODULE_28___default = /*#__PURE__*/__webpack_require__.n(_css_milestones_scss__WEBPACK_IMPORTED_MODULE_28__);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../css/infiltration.scss */ 1351);\n/* harmony import */ var _css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29___default = /*#__PURE__*/__webpack_require__.n(_css_infiltration_scss__WEBPACK_IMPORTED_MODULE_29__);\n// These should really be imported with the module that is presenting that UI, but because they very much depend on the\n// cascade order, we'll pull them all in here.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n//# sourceURL=webpack:///./src/engineStyle.js?"); /***/ }), -/***/ 1292: +/***/ 1295: /*!*************************!*\ !*** ./css/styles.scss ***! \*************************/ @@ -179,7 +179,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1294: +/***/ 1297: /*!***************************!*\ !*** ./css/tooltips.scss ***! \***************************/ @@ -190,7 +190,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1296: +/***/ 1299: /*!**************************!*\ !*** ./css/buttons.scss ***! \**************************/ @@ -201,7 +201,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1298: +/***/ 1301: /*!***************************!*\ !*** ./css/mainmenu.scss ***! \***************************/ @@ -212,7 +212,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1300: +/***/ 1303: /*!************************************!*\ !*** ./css/characteroverview.scss ***! \************************************/ @@ -223,7 +223,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1302: +/***/ 1305: /*!***************************!*\ !*** ./css/terminal.scss ***! \***************************/ @@ -234,7 +234,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1304: +/***/ 1307: /*!*******************************!*\ !*** ./css/scripteditor.scss ***! \*******************************/ @@ -245,7 +245,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1306: +/***/ 1309: /*!*******************************!*\ !*** ./css/hacknetnodes.scss ***! \*******************************/ @@ -256,7 +256,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1308: +/***/ 1311: /*!****************************!*\ !*** ./css/menupages.scss ***! \****************************/ @@ -267,7 +267,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1310: +/***/ 1313: /*!********************************!*\ !*** ./css/augmentations.scss ***! \********************************/ @@ -278,7 +278,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1312: +/***/ 1315: /*!**************************!*\ !*** ./css/redpill.scss ***! \**************************/ @@ -289,7 +289,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1314: +/***/ 1317: /*!******************************!*\ !*** ./css/stockmarket.scss ***! \******************************/ @@ -300,7 +300,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1316: +/***/ 1319: /*!*********************************!*\ !*** ./css/workinprogress.scss ***! \*********************************/ @@ -311,7 +311,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1318: +/***/ 1321: /*!*****************************!*\ !*** ./css/popupboxes.scss ***! \*****************************/ @@ -322,7 +322,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1320: +/***/ 1323: /*!******************************!*\ !*** ./css/gameoptions.scss ***! \******************************/ @@ -333,7 +333,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1322: +/***/ 1325: /*!**************************************!*\ !*** ./css/interactivetutorial.scss ***! \**************************************/ @@ -344,7 +344,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1324: +/***/ 1327: /*!*************************!*\ !*** ./css/loader.scss ***! \*************************/ @@ -355,7 +355,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1326: +/***/ 1329: /*!***************************!*\ !*** ./css/missions.scss ***! \***************************/ @@ -366,7 +366,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1328: +/***/ 1331: /*!************************************!*\ !*** ./css/companymanagement.scss ***! \************************************/ @@ -377,7 +377,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1330: +/***/ 1333: /*!******************************!*\ !*** ./css/bladeburner.scss ***! \******************************/ @@ -388,7 +388,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1332: +/***/ 1335: /*!***********************!*\ !*** ./css/gang.scss ***! \***********************/ @@ -399,7 +399,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1334: +/***/ 1337: /*!**************************!*\ !*** ./css/sleeves.scss ***! \**************************/ @@ -410,7 +410,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1336: +/***/ 1339: /*!*****************************!*\ !*** ./css/resleeving.scss ***! \*****************************/ @@ -421,7 +421,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1338: +/***/ 1341: /*!************************!*\ !*** ./css/treant.css ***! \************************/ @@ -432,7 +432,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1340: +/***/ 1343: /*!**************************!*\ !*** ./css/grid.min.css ***! \**************************/ @@ -443,7 +443,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1342: +/***/ 1345: /*!**************************!*\ !*** ./css/dev-menu.css ***! \**************************/ @@ -454,7 +454,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1344: +/***/ 1347: /*!*************************!*\ !*** ./css/casino.scss ***! \*************************/ @@ -465,7 +465,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1346: +/***/ 1349: /*!*****************************!*\ !*** ./css/milestones.scss ***! \*****************************/ @@ -476,7 +476,7 @@ eval("// extracted by mini-css-extract-plugin\n\n//# sourceURL=webpack:///./css/ /***/ }), -/***/ 1348: +/***/ 1351: /*!*******************************!*\ !*** ./css/infiltration.scss ***! \*******************************/ diff --git a/dist/vendor.bundle.js b/dist/vendor.bundle.js index e8973db04..1b06d10b9 100644 --- a/dist/vendor.bundle.js +++ b/dist/vendor.bundle.js @@ -8,7 +8,7 @@ /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ 1094);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/index.js?"); +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react.development.js */ 1097);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/index.js?"); /***/ }), /* 1 */ @@ -19,7 +19,7 @@ eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs /*! exports used: default */ /***/ (function(module, exports, __webpack_require__) { -eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ 504);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 1137)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); +eval("/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (true) {\n var ReactIs = __webpack_require__(/*! react-is */ 504);\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = __webpack_require__(/*! ./factoryWithTypeCheckers */ 1140)(ReactIs.isElement, throwOnDirectAccess);\n} else {}\n\n\n//# sourceURL=webpack:///./node_modules/prop-types/index.js?"); /***/ }), /* 2 */, @@ -47,7 +47,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ 1140);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/jsx-runtime.js?"); +eval("\n\nif (false) {} else {\n module.exports = __webpack_require__(/*! ./cjs/react-jsx-runtime.development.js */ 1143);\n}\n\n\n//# sourceURL=webpack:///./node_modules/react/jsx-runtime.js?"); /***/ }), /* 8 */, @@ -78,7 +78,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return rootShouldForwardProp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return slotShouldForwardProp; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 575);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 279);\n\n\nconst rootShouldForwardProp = prop => Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* shouldForwardProp */ \"b\"])(prop) && prop !== 'classes';\nconst slotShouldForwardProp = _mui_system__WEBPACK_IMPORTED_MODULE_0__[/* shouldForwardProp */ \"b\"];\nconst styled = Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n rootShouldForwardProp\n});\n/* harmony default export */ __webpack_exports__[\"a\"] = (styled);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/styled.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return rootShouldForwardProp; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return slotShouldForwardProp; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 575);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 280);\n\n\nconst rootShouldForwardProp = prop => Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* shouldForwardProp */ \"b\"])(prop) && prop !== 'classes';\nconst slotShouldForwardProp = _mui_system__WEBPACK_IMPORTED_MODULE_0__[/* shouldForwardProp */ \"b\"];\nconst styled = Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"],\n rootShouldForwardProp\n});\n/* harmony default export */ __webpack_exports__[\"a\"] = (styled);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/styled.js?"); /***/ }), /* 17 */ @@ -100,8 +100,7 @@ eval("function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string /* 22 */, /* 23 */, /* 24 */, -/* 25 */, -/* 26 */ +/* 25 */ /*!*************************************************************!*\ !*** ./node_modules/@mui/material/Typography/Typography.js ***! \*************************************************************/ @@ -113,6 +112,7 @@ eval("function toVal(mix) {\n\tvar k, y, str='';\n\n\tif (typeof mix === 'string eval("/* unused harmony export TypographyRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _typographyClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./typographyClasses */ 758);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"gutterBottom\", \"noWrap\", \"paragraph\", \"variant\", \"variantMapping\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n align,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, ownerState.align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(align)}`, gutterBottom && 'gutterBottom', noWrap && 'noWrap', paragraph && 'paragraph']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _typographyClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTypographyUtilityClass */ \"a\"], classes);\n};\n\nconst TypographyRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiTypography',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.variant && styles[ownerState.variant], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])(ownerState.align)}`], ownerState.noWrap && styles.noWrap, ownerState.gutterBottom && styles.gutterBottom, ownerState.paragraph && styles.paragraph];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n margin: 0\n}, ownerState.variant && theme.typography[ownerState.variant], ownerState.align !== 'inherit' && {\n textAlign: ownerState.align\n}, ownerState.noWrap && {\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap'\n}, ownerState.gutterBottom && {\n marginBottom: '0.35em'\n}, ownerState.paragraph && {\n marginBottom: 16\n}));\nconst defaultVariantMapping = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n h6: 'h6',\n subtitle1: 'h6',\n subtitle2: 'h6',\n body1: 'p',\n body2: 'p',\n inherit: 'p'\n}; // TODO v6: deprecate these color values in v5.x and remove the transformation in v6\n\nconst colorTransformations = {\n primary: 'primary.main',\n textPrimary: 'text.primary',\n secondary: 'secondary.main',\n textSecondary: 'text.secondary',\n error: 'error.main'\n};\n\nconst transformDeprecatedColors = color => {\n return colorTransformations[color] || color;\n};\n\nconst Typography = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Typography(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTypography'\n });\n const color = transformDeprecatedColors(themeProps.color);\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, themeProps, {\n color\n }));\n\n const {\n align = 'inherit',\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = 'body1',\n variantMapping = defaultVariantMapping\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n color,\n className,\n component,\n gutterBottom,\n noWrap,\n paragraph,\n variant,\n variantMapping\n });\n\n const Component = component || (paragraph ? 'p' : variantMapping[variant] || defaultVariantMapping[variant]) || 'span';\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TypographyRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: Component,\n ref: ref,\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className)\n }, other));\n});\n true ? Typography.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the component.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the text will have a bottom margin.\n * @default false\n */\n gutterBottom: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the text will not wrap, but instead will truncate with a text overflow ellipsis.\n *\n * Note that text overflow can only happen with block or inline-block level elements\n * (the element needs to have a width in order to overflow).\n * @default false\n */\n noWrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the element will be a paragraph element.\n * @default false\n */\n paragraph: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Applies the theme typography styles.\n * @default 'body1'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body1', 'body2', 'button', 'caption', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'inherit', 'overline', 'subtitle1', 'subtitle2']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component maps the variant prop to a range of different HTML element types.\n * For instance, subtitle1 to `
`.\n * If you wish to change that mapping, you can provide your own.\n * Alternatively, you can use the `component` prop.\n * @default {\n * h1: 'h1',\n * h2: 'h2',\n * h3: 'h3',\n * h4: 'h4',\n * h5: 'h5',\n * h6: 'h6',\n * subtitle1: 'h6',\n * subtitle2: 'h6',\n * body1: 'p',\n * body2: 'p',\n * inherit: 'p',\n * }\n */\n variantMapping: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Typography);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Typography/Typography.js?"); /***/ }), +/* 26 */, /* 27 */ /*!********************************************************!*\ !*** ./node_modules/@mui/material/utils/capitalize.js ***! @@ -136,7 +136,7 @@ eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useThemeProps; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 1351);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 279);\n\n\nfunction useThemeProps({\n props,\n name\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n props,\n name,\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n });\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useThemeProps.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useThemeProps; });\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/system */ 1354);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./defaultTheme */ 280);\n\n\nfunction useThemeProps({\n props,\n name\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n props,\n name,\n defaultTheme: _defaultTheme__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n });\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useThemeProps.js?"); /***/ }), /* 31 */, @@ -167,7 +167,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getPath; });\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 233);\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ 214);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ 114);\n\n\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n}\n\nfunction getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n\n if (transform) {\n value = transform(value);\n }\n\n return value;\n}\n\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : Object(_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(propValueFinal)}`, propValueFinal);\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return {\n [cssProperty]: value\n };\n };\n\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[/* handleBreakpoints */ \"b\"])(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = true ? {\n [prop]: _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n } : undefined;\n fn.filterProps = [prop];\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (style);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/style.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return getPath; });\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 233);\n/* harmony import */ var _responsivePropType__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./responsivePropType */ 215);\n/* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./breakpoints */ 114);\n\n\n\nfunction getPath(obj, path) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n return path.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n}\n\nfunction getValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n\n if (transform) {\n value = transform(value);\n }\n\n return value;\n}\n\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : Object(_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(propValueFinal)}`, propValueFinal);\n }\n\n if (cssProperty === false) {\n return value;\n }\n\n return {\n [cssProperty]: value\n };\n };\n\n return Object(_breakpoints__WEBPACK_IMPORTED_MODULE_2__[/* handleBreakpoints */ \"b\"])(props, propValue, styleFromPropValue);\n };\n\n fn.propTypes = true ? {\n [prop]: _responsivePropType__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"]\n } : undefined;\n fn.filterProps = [prop];\n return fn;\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (style);\n\n//# sourceURL=webpack:///./node_modules/@mui/system/esm/style.js?"); /***/ }), /* 40 */, @@ -187,7 +187,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _buttonClasses__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./buttonClasses */ 365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);\n\n\nconst _excluded = [\"children\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(color)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, `${variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['startIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`],\n endIcon: ['endIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`]\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* getButtonUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst commonIconStyles = ownerState => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.size === 'small' && {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n}, ownerState.size === 'medium' && {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n}, ownerState.size === 'large' && {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n});\n\nconst ButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.color)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], styles[`${ownerState.variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.button, {\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textDecoration: 'none',\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n border: `1px solid ${theme.palette[ownerState.color].main}`,\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'contained' && {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n }\n }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n backgroundColor: theme.palette[ownerState.color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette[ownerState.color].main\n }\n }),\n '&:active': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[8]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[6]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n color: theme.palette.action.disabled\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.action.disabledBackground}`\n }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {\n border: `1px solid ${theme.palette.action.disabled}`\n }, ownerState.variant === 'contained' && {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n })\n}, ownerState.variant === 'text' && {\n padding: '6px 8px'\n}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}, ownerState.variant === 'outlined' && {\n padding: '5px 15px',\n border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`\n}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main,\n border: `1px solid ${Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, 0.5)}`\n}, ownerState.variant === 'contained' && {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2]\n}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].contrastText,\n backgroundColor: theme.palette[ownerState.color].main\n}, ownerState.color === 'inherit' && {\n color: 'inherit',\n borderColor: 'currentColor'\n}, ownerState.size === 'small' && ownerState.variant === 'text' && {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'text' && {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'contained' && {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'contained' && {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.fullWidth && {\n width: '100%'\n}), ({\n ownerState\n}) => ownerState.disableElevation && {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: {\n boxShadow: 'none'\n }\n});\nconst ButtonStartIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4\n}, ownerState.size === 'small' && {\n marginLeft: -2\n}, commonIconStyles(ownerState)));\nconst ButtonEndIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8\n}, ownerState.size === 'small' && {\n marginRight: -2\n}, commonIconStyles(ownerState)));\nconst Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Button(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiButton'\n });\n\n const {\n children,\n color = 'primary',\n component = 'button',\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const startIcon = startIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n\n const endIcon = endIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsxs\"])(ButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other, {\n classes: classes,\n children: [startIcon, children, endIcon]\n }));\n});\n true ? Button.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium', 'large']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Element placed before the children.\n */\n startIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['contained', 'outlined', 'text']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Button);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Button/Button.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ButtonBase */ 300);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _buttonClasses__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./buttonClasses */ 367);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__);\n\n\nconst _excluded = [\"children\", \"color\", \"component\", \"disabled\", \"disableElevation\", \"disableFocusRipple\", \"endIcon\", \"focusVisibleClassName\", \"fullWidth\", \"size\", \"startIcon\", \"type\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n color,\n disableElevation,\n fullWidth,\n size,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, `${variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(color)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, `${variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`, color === 'inherit' && 'colorInherit', disableElevation && 'disableElevation', fullWidth && 'fullWidth'],\n label: ['label'],\n startIcon: ['startIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`],\n endIcon: ['endIcon', `iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(size)}`]\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* getButtonUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst commonIconStyles = ownerState => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.size === 'small' && {\n '& > *:nth-of-type(1)': {\n fontSize: 18\n }\n}, ownerState.size === 'medium' && {\n '& > *:nth-of-type(1)': {\n fontSize: 20\n }\n}, ownerState.size === 'large' && {\n '& > *:nth-of-type(1)': {\n fontSize: 22\n }\n});\n\nconst ButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`${ownerState.variant}${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.color)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], styles[`${ownerState.variant}Size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`], ownerState.color === 'inherit' && styles.colorInherit, ownerState.disableElevation && styles.disableElevation, ownerState.fullWidth && styles.fullWidth];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.button, {\n minWidth: 64,\n padding: '6px 16px',\n borderRadius: theme.shape.borderRadius,\n transition: theme.transitions.create(['background-color', 'box-shadow', 'border-color', 'color'], {\n duration: theme.transitions.duration.short\n }),\n '&:hover': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textDecoration: 'none',\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.text.primary, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n border: `1px solid ${theme.palette[ownerState.color].main}`,\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }, ownerState.variant === 'contained' && {\n backgroundColor: theme.palette.grey.A100,\n boxShadow: theme.shadows[4],\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n boxShadow: theme.shadows[2],\n backgroundColor: theme.palette.grey[300]\n }\n }, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n backgroundColor: theme.palette[ownerState.color].dark,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.palette[ownerState.color].main\n }\n }),\n '&:active': Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[8]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.variant === 'contained' && {\n boxShadow: theme.shadows[6]\n }),\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n color: theme.palette.action.disabled\n }, ownerState.variant === 'outlined' && {\n border: `1px solid ${theme.palette.action.disabledBackground}`\n }, ownerState.variant === 'outlined' && ownerState.color === 'secondary' && {\n border: `1px solid ${theme.palette.action.disabled}`\n }, ownerState.variant === 'contained' && {\n color: theme.palette.action.disabled,\n boxShadow: theme.shadows[0],\n backgroundColor: theme.palette.action.disabledBackground\n })\n}, ownerState.variant === 'text' && {\n padding: '6px 8px'\n}, ownerState.variant === 'text' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main\n}, ownerState.variant === 'outlined' && {\n padding: '5px 15px',\n border: `1px solid ${theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)'}`\n}, ownerState.variant === 'outlined' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].main,\n border: `1px solid ${Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, 0.5)}`\n}, ownerState.variant === 'contained' && {\n color: theme.palette.getContrastText(theme.palette.grey[300]),\n backgroundColor: theme.palette.grey[300],\n boxShadow: theme.shadows[2]\n}, ownerState.variant === 'contained' && ownerState.color !== 'inherit' && {\n color: theme.palette[ownerState.color].contrastText,\n backgroundColor: theme.palette[ownerState.color].main\n}, ownerState.color === 'inherit' && {\n color: 'inherit',\n borderColor: 'currentColor'\n}, ownerState.size === 'small' && ownerState.variant === 'text' && {\n padding: '4px 5px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'text' && {\n padding: '8px 11px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'outlined' && {\n padding: '3px 9px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'outlined' && {\n padding: '7px 21px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.size === 'small' && ownerState.variant === 'contained' && {\n padding: '4px 10px',\n fontSize: theme.typography.pxToRem(13)\n}, ownerState.size === 'large' && ownerState.variant === 'contained' && {\n padding: '8px 22px',\n fontSize: theme.typography.pxToRem(15)\n}, ownerState.fullWidth && {\n width: '100%'\n}), ({\n ownerState\n}) => ownerState.disableElevation && {\n boxShadow: 'none',\n '&:hover': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].focusVisible}`]: {\n boxShadow: 'none'\n },\n '&:active': {\n boxShadow: 'none'\n },\n [`&.${_buttonClasses__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].disabled}`]: {\n boxShadow: 'none'\n }\n});\nconst ButtonStartIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'StartIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.startIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: 8,\n marginLeft: -4\n}, ownerState.size === 'small' && {\n marginLeft: -2\n}, commonIconStyles(ownerState)));\nconst ButtonEndIcon = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])('span', {\n name: 'MuiButton',\n slot: 'EndIcon',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.endIcon, styles[`iconSize${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'inherit',\n marginRight: -4,\n marginLeft: 8\n}, ownerState.size === 'small' && {\n marginRight: -2\n}, commonIconStyles(ownerState)));\nconst Button = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Button(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiButton'\n });\n\n const {\n children,\n color = 'primary',\n component = 'button',\n disabled = false,\n disableElevation = false,\n disableFocusRipple = false,\n endIcon: endIconProp,\n focusVisibleClassName,\n fullWidth = false,\n size = 'medium',\n startIcon: startIconProp,\n type,\n variant = 'text'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n color,\n component,\n disabled,\n disableElevation,\n disableFocusRipple,\n fullWidth,\n size,\n type,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const startIcon = startIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonStartIcon, {\n className: classes.startIcon,\n ownerState: ownerState,\n children: startIconProp\n });\n\n const endIcon = endIconProp && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsx\"])(ButtonEndIcon, {\n className: classes.endIcon,\n ownerState: ownerState,\n children: endIconProp\n });\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_12__[\"jsxs\"])(ButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n component: component,\n disabled: disabled,\n focusRipple: !disableFocusRipple,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName),\n ref: ref,\n type: type\n }, other, {\n classes: classes,\n children: [startIcon, children, endIcon]\n }));\n});\n true ? Button.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'primary'\n */\n color: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['inherit', 'primary', 'secondary', 'success', 'error', 'info', 'warning']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, no elevation is used.\n * @default false\n */\n disableElevation: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the keyboard focus ripple is disabled.\n * @default false\n */\n disableFocusRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Element placed after the children.\n */\n endIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the button will take up the full width of its container.\n * @default false\n */\n fullWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The URL to link to when the button is clicked.\n * If defined, an `a` element will be used as the root node.\n */\n href: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The size of the component.\n * `small` is equivalent to the dense button styling.\n * @default 'medium'\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium', 'large']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Element placed before the children.\n */\n startIcon: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n type: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['button', 'reset', 'submit']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The variant to use.\n * @default 'text'\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['contained', 'outlined', 'text']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Button);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Button/Button.js?"); /***/ }), /* 49 */, @@ -245,7 +245,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Table/TableContext */ 462);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./tableCellClasses */ 554);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n align,\n padding,\n size,\n stickyHeader\n } = ownerState;\n const slots = {\n root: ['root', variant, stickyHeader && 'stickyHeader', align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(align)}`, padding !== 'normal' && `padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(padding)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* getTableCellUtilityClass */ \"b\"], classes);\n};\n\nconst TableCellRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])('td', {\n name: 'MuiTableCell',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.size)}`], ownerState.padding !== 'normal' && styles[`padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.padding)}`], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.align)}`], ownerState.stickyHeader && styles.stickyHeader];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: `1px solid\n ${theme.palette.mode === 'light' ? Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* lighten */ \"d\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.88) : Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* darken */ \"b\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.68)}`,\n textAlign: 'left',\n padding: 16\n}, ownerState.variant === 'head' && {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.variant === 'body' && {\n color: theme.palette.text.primary\n}, ownerState.variant === 'footer' && {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n}, ownerState.size === 'small' && {\n padding: '6px 16px',\n [`&.${_tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].paddingCheckbox}`]: {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '& > *': {\n padding: 0\n }\n }\n}, ownerState.padding === 'checkbox' && {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px'\n}, ownerState.padding === 'none' && {\n padding: 0\n}, ownerState.align === 'left' && {\n textAlign: 'left'\n}, ownerState.align === 'center' && {\n textAlign: 'center'\n}, ownerState.align === 'right' && {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n}, ownerState.align === 'justify' && {\n textAlign: 'justify'\n}, ownerState.stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n}));\n/**\n * The component renders a `` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nconst TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableCell(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableCell'\n });\n\n const {\n align = 'inherit',\n className,\n component: componentProp,\n padding: paddingProp,\n scope: scopeProp,\n size: sizeProp,\n sortDirection,\n variant: variantProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const table = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]);\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n let component;\n\n if (componentProp) {\n component = componentProp;\n } else {\n component = isHeadCell ? 'th' : 'td';\n }\n\n let scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n const variant = variantProp || tablelvl2 && tablelvl2.variant;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n component,\n padding: paddingProp || (table && table.padding ? table.padding : 'normal'),\n size: sizeProp || (table && table.size ? table.size : 'medium'),\n sortDirection,\n stickyHeader: variant === 'head' && table && table.stickyHeader,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n let ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(TableCellRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n \"aria-sort\": ariaSort,\n scope: scope,\n ownerState: ownerState\n }, other));\n});\n true ? TableCell.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Sets the padding applied to the cell.\n * The prop defaults to the value (`'default'`) inherited from the parent Table component.\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['checkbox', 'none', 'normal']),\n\n /**\n * Set scope attribute.\n */\n scope: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify the size of the cell.\n * The prop defaults to the value (`'medium'`) inherited from the parent Table component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc', false]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body', 'footer', 'head'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableCell);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableCell/TableCell.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _Table_TableContext__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../Table/TableContext */ 463);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 283);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./tableCellClasses */ 554);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"align\", \"className\", \"component\", \"padding\", \"scope\", \"size\", \"sortDirection\", \"variant\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n variant,\n align,\n padding,\n size,\n stickyHeader\n } = ownerState;\n const slots = {\n root: ['root', variant, stickyHeader && 'stickyHeader', align !== 'inherit' && `align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(align)}`, padding !== 'normal' && `padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(padding)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* getTableCellUtilityClass */ \"b\"], classes);\n};\n\nconst TableCellRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])('td', {\n name: 'MuiTableCell',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.size)}`], ownerState.padding !== 'normal' && styles[`padding${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.padding)}`], ownerState.align !== 'inherit' && styles[`align${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(ownerState.align)}`], ownerState.stickyHeader && styles.stickyHeader];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body2, {\n display: 'table-cell',\n verticalAlign: 'inherit',\n // Workaround for a rendering bug with spanned columns in Chrome 62.0.\n // Removes the alpha (sets it to 1), and lightens or darkens the theme color.\n borderBottom: `1px solid\n ${theme.palette.mode === 'light' ? Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* lighten */ \"d\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.88) : Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* darken */ \"b\"])(Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.divider, 1), 0.68)}`,\n textAlign: 'left',\n padding: 16\n}, ownerState.variant === 'head' && {\n color: theme.palette.text.primary,\n lineHeight: theme.typography.pxToRem(24),\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.variant === 'body' && {\n color: theme.palette.text.primary\n}, ownerState.variant === 'footer' && {\n color: theme.palette.text.secondary,\n lineHeight: theme.typography.pxToRem(21),\n fontSize: theme.typography.pxToRem(12)\n}, ownerState.size === 'small' && {\n padding: '6px 16px',\n [`&.${_tableCellClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].paddingCheckbox}`]: {\n width: 24,\n // prevent the checkbox column from growing\n padding: '0 12px 0 16px',\n '& > *': {\n padding: 0\n }\n }\n}, ownerState.padding === 'checkbox' && {\n width: 48,\n // prevent the checkbox column from growing\n padding: '0 0 0 4px'\n}, ownerState.padding === 'none' && {\n padding: 0\n}, ownerState.align === 'left' && {\n textAlign: 'left'\n}, ownerState.align === 'center' && {\n textAlign: 'center'\n}, ownerState.align === 'right' && {\n textAlign: 'right',\n flexDirection: 'row-reverse'\n}, ownerState.align === 'justify' && {\n textAlign: 'justify'\n}, ownerState.stickyHeader && {\n position: 'sticky',\n top: 0,\n zIndex: 2,\n backgroundColor: theme.palette.background.default\n}));\n/**\n * The component renders a `` element when the parent context is a header\n * or otherwise a `` element.\n */\n\nconst TableCell = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableCell(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableCell'\n });\n\n const {\n align = 'inherit',\n className,\n component: componentProp,\n padding: paddingProp,\n scope: scopeProp,\n size: sizeProp,\n sortDirection,\n variant: variantProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const table = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_TableContext__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"]);\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const isHeadCell = tablelvl2 && tablelvl2.variant === 'head';\n let component;\n\n if (componentProp) {\n component = componentProp;\n } else {\n component = isHeadCell ? 'th' : 'td';\n }\n\n let scope = scopeProp;\n\n if (!scope && isHeadCell) {\n scope = 'col';\n }\n\n const variant = variantProp || tablelvl2 && tablelvl2.variant;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n align,\n component,\n padding: paddingProp || (table && table.padding ? table.padding : 'normal'),\n size: sizeProp || (table && table.size ? table.size : 'medium'),\n sortDirection,\n stickyHeader: variant === 'head' && table && table.stickyHeader,\n variant\n });\n\n const classes = useUtilityClasses(ownerState);\n let ariaSort = null;\n\n if (sortDirection) {\n ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(TableCellRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n \"aria-sort\": ariaSort,\n scope: scope,\n ownerState: ownerState\n }, other));\n});\n true ? TableCell.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Set the text-align on the table cell content.\n *\n * Monetary or generally number fields **should be right aligned** as that allows\n * you to add them up quickly in your head without having to worry about decimals.\n * @default 'inherit'\n */\n align: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'inherit', 'justify', 'left', 'right']),\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Sets the padding applied to the cell.\n * The prop defaults to the value (`'default'`) inherited from the parent Table component.\n */\n padding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['checkbox', 'none', 'normal']),\n\n /**\n * Set scope attribute.\n */\n scope: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Specify the size of the cell.\n * The prop defaults to the value (`'medium'`) inherited from the parent Table component.\n */\n size: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['small', 'medium']),\n\n /**\n * Set aria-sort direction.\n */\n sortDirection: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['asc', 'desc', false]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Specify the cell type.\n * The prop defaults to the value inherited from the parent TableHead, TableBody, or TableFooter components.\n */\n variant: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['body', 'footer', 'head'])\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableCell);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableCell/TableCell.js?"); /***/ }), /* 63 */, @@ -258,7 +258,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.XMLNode = exports.TextNode = exports.AbstractMmlEmptyNode = exports.AbstractMmlBaseNode = exports.AbstractMmlLayoutNode = exports.AbstractMmlTokenNode = exports.AbstractMmlNode = exports.indentAttributes = exports.TEXCLASSNAMES = exports.TEXCLASS = void 0;\nvar Attributes_js_1 = __webpack_require__(/*! ./Attributes.js */ 381);\nvar Node_js_1 = __webpack_require__(/*! ../Tree/Node.js */ 1145);\nexports.TEXCLASS = {\n ORD: 0,\n OP: 1,\n BIN: 2,\n REL: 3,\n OPEN: 4,\n CLOSE: 5,\n PUNCT: 6,\n INNER: 7,\n VCENTER: 8,\n NONE: -1\n};\nexports.TEXCLASSNAMES = ['ORD', 'OP', 'BIN', 'REL', 'OPEN', 'CLOSE', 'PUNCT', 'INNER', 'VCENTER'];\nvar TEXSPACELENGTH = ['', 'thinmathspace', 'mediummathspace', 'thickmathspace'];\nvar TEXSPACE = [\n [0, -1, 2, 3, 0, 0, 0, 1],\n [-1, -1, 0, 3, 0, 0, 0, 1],\n [2, 2, 0, 0, 2, 0, 0, 2],\n [3, 3, 0, 0, 3, 0, 0, 3],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, -1, 2, 3, 0, 0, 0, 1],\n [1, 1, 0, 1, 1, 1, 1, 1],\n [1, -1, 2, 3, 1, 0, 1, 1]\n];\nexports.indentAttributes = [\n 'indentalign', 'indentalignfirst',\n 'indentshift', 'indentshiftfirst'\n];\nvar AbstractMmlNode = (function (_super) {\n __extends(AbstractMmlNode, _super);\n function AbstractMmlNode(factory, attributes, children) {\n if (attributes === void 0) { attributes = {}; }\n if (children === void 0) { children = []; }\n var _this = _super.call(this, factory) || this;\n _this.prevClass = null;\n _this.prevLevel = null;\n _this.texclass = null;\n if (_this.arity < 0) {\n _this.childNodes = [factory.create('inferredMrow')];\n _this.childNodes[0].parent = _this;\n }\n _this.setChildren(children);\n _this.attributes = new Attributes_js_1.Attributes(factory.getNodeClass(_this.kind).defaults, factory.getNodeClass('math').defaults);\n _this.attributes.setList(attributes);\n return _this;\n }\n AbstractMmlNode.prototype.copy = function (keepIds) {\n var e_1, _a, e_2, _b;\n if (keepIds === void 0) { keepIds = false; }\n var node = this.factory.create(this.kind);\n node.properties = __assign({}, this.properties);\n if (this.attributes) {\n var attributes = this.attributes.getAllAttributes();\n try {\n for (var _c = __values(Object.keys(attributes)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (name_1 !== 'id' || keepIds) {\n node.attributes.set(name_1, attributes[name_1]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (this.childNodes && this.childNodes.length) {\n var children = this.childNodes;\n if (children.length === 1 && children[0].isInferred) {\n children = children[0].childNodes;\n }\n try {\n for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {\n var child = children_1_1.value;\n if (child) {\n node.appendChild(child.copy());\n }\n else {\n node.childNodes.push(null);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return node;\n };\n Object.defineProperty(AbstractMmlNode.prototype, \"texClass\", {\n get: function () {\n return this.texclass;\n },\n set: function (texClass) {\n this.texclass = texClass;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"arity\", {\n get: function () {\n return Infinity;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"Parent\", {\n get: function () {\n var parent = this.parent;\n while (parent && parent.notParent) {\n parent = parent.Parent;\n }\n return parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlNode.prototype.setChildren = function (children) {\n if (this.arity < 0) {\n return this.childNodes[0].setChildren(children);\n }\n return _super.prototype.setChildren.call(this, children);\n };\n AbstractMmlNode.prototype.appendChild = function (child) {\n var e_3, _a;\n var _this = this;\n if (this.arity < 0) {\n this.childNodes[0].appendChild(child);\n return child;\n }\n if (child.isInferred) {\n if (this.arity === Infinity) {\n child.childNodes.forEach(function (node) { return _super.prototype.appendChild.call(_this, node); });\n return child;\n }\n var original = child;\n child = this.factory.create('mrow');\n child.setChildren(original.childNodes);\n child.attributes = original.attributes;\n try {\n for (var _b = __values(original.getPropertyNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_2 = _c.value;\n child.setProperty(name_2, original.getProperty(name_2));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n return _super.prototype.appendChild.call(this, child);\n };\n AbstractMmlNode.prototype.replaceChild = function (newChild, oldChild) {\n if (this.arity < 0) {\n this.childNodes[0].replaceChild(newChild, oldChild);\n return newChild;\n }\n return _super.prototype.replaceChild.call(this, newChild, oldChild);\n };\n AbstractMmlNode.prototype.core = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlNode.prototype.childPosition = function () {\n var e_4, _a;\n var child = this;\n var parent = child.parent;\n while (parent && parent.notParent) {\n child = parent;\n parent = parent.parent;\n }\n if (parent) {\n var i = 0;\n try {\n for (var _b = __values(parent.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var node = _c.value;\n if (node === child) {\n return i;\n }\n i++;\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n return null;\n };\n AbstractMmlNode.prototype.setTeXclass = function (prev) {\n this.getPrevClass(prev);\n return (this.texClass != null ? this : prev);\n };\n AbstractMmlNode.prototype.updateTeXclass = function (core) {\n if (core) {\n this.prevClass = core.prevClass;\n this.prevLevel = core.prevLevel;\n core.prevClass = core.prevLevel = null;\n this.texClass = core.texClass;\n }\n };\n AbstractMmlNode.prototype.getPrevClass = function (prev) {\n if (prev) {\n this.prevClass = prev.texClass;\n this.prevLevel = prev.attributes.get('scriptlevel');\n }\n };\n AbstractMmlNode.prototype.texSpacing = function () {\n var prevClass = (this.prevClass != null ? this.prevClass : exports.TEXCLASS.NONE);\n var texClass = this.texClass || exports.TEXCLASS.ORD;\n if (prevClass === exports.TEXCLASS.NONE || texClass === exports.TEXCLASS.NONE) {\n return '';\n }\n if (prevClass === exports.TEXCLASS.VCENTER) {\n prevClass = exports.TEXCLASS.ORD;\n }\n if (texClass === exports.TEXCLASS.VCENTER) {\n texClass = exports.TEXCLASS.ORD;\n }\n var space = TEXSPACE[prevClass][texClass];\n if ((this.prevLevel > 0 || this.attributes.get('scriptlevel') > 0) && space >= 0) {\n return '';\n }\n return TEXSPACELENGTH[Math.abs(space)];\n };\n AbstractMmlNode.prototype.hasSpacingAttributes = function () {\n return this.isEmbellished && this.coreMO().hasSpacingAttributes();\n };\n AbstractMmlNode.prototype.setInheritedAttributes = function (attributes, display, level, prime) {\n var e_5, _a;\n if (attributes === void 0) { attributes = {}; }\n if (display === void 0) { display = false; }\n if (level === void 0) { level = 0; }\n if (prime === void 0) { prime = false; }\n var defaults = this.attributes.getAllDefaults();\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (defaults.hasOwnProperty(key) || AbstractMmlNode.alwaysInherit.hasOwnProperty(key)) {\n var _d = __read(attributes[key], 2), node = _d[0], value = _d[1];\n var noinherit = (AbstractMmlNode.noInherit[node] || {})[this.kind] || {};\n if (!noinherit[key]) {\n this.attributes.setInherited(key, value);\n }\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_5) throw e_5.error; }\n }\n var displaystyle = this.attributes.getExplicit('displaystyle');\n if (displaystyle === undefined) {\n this.attributes.setInherited('displaystyle', display);\n }\n var scriptlevel = this.attributes.getExplicit('scriptlevel');\n if (scriptlevel === undefined) {\n this.attributes.setInherited('scriptlevel', level);\n }\n if (prime) {\n this.setProperty('texprimestyle', prime);\n }\n var arity = this.arity;\n if (arity >= 0 && arity !== Infinity && ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n if (arity < this.childNodes.length) {\n this.childNodes = this.childNodes.slice(0, arity);\n }\n else {\n while (this.childNodes.length < arity) {\n this.appendChild(this.factory.create('mrow'));\n }\n }\n }\n this.setChildInheritedAttributes(attributes, display, level, prime);\n };\n AbstractMmlNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_6, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_6) throw e_6.error; }\n }\n };\n AbstractMmlNode.prototype.addInheritedAttributes = function (current, attributes) {\n var e_7, _a;\n var updated = __assign({}, current);\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_3 = _c.value;\n if (name_3 !== 'displaystyle' && name_3 !== 'scriptlevel' && name_3 !== 'style') {\n updated[name_3] = [this.kind, attributes[name_3]];\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_7) throw e_7.error; }\n }\n return updated;\n };\n AbstractMmlNode.prototype.inheritAttributesFrom = function (node) {\n var attributes = node.attributes;\n var display = attributes.get('displaystyle');\n var scriptlevel = attributes.get('scriptlevel');\n var defaults = (!attributes.isSet('mathsize') ? {} : {\n mathsize: ['math', attributes.get('mathsize')]\n });\n var prime = node.getProperty('texprimestyle') || false;\n this.setInheritedAttributes(defaults, display, scriptlevel, prime);\n };\n AbstractMmlNode.prototype.verifyTree = function (options) {\n if (options === void 0) { options = null; }\n if (options === null) {\n return;\n }\n this.verifyAttributes(options);\n var arity = this.arity;\n if (options['checkArity']) {\n if (arity >= 0 && arity !== Infinity &&\n ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n this.mError('Wrong number of children for \"' + this.kind + '\" node', options, true);\n }\n }\n this.verifyChildren(options);\n };\n AbstractMmlNode.prototype.verifyAttributes = function (options) {\n var e_8, _a;\n if (options['checkAttributes']) {\n var attributes = this.attributes;\n var bad = [];\n try {\n for (var _b = __values(attributes.getExplicitNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_4 = _c.value;\n if (name_4.substr(0, 5) !== 'data-' && attributes.getDefault(name_4) === undefined &&\n !name_4.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {\n bad.push(name_4);\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_8) throw e_8.error; }\n }\n if (bad.length) {\n this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);\n }\n }\n };\n AbstractMmlNode.prototype.verifyChildren = function (options) {\n var e_9, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.verifyTree(options);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_9) throw e_9.error; }\n }\n };\n AbstractMmlNode.prototype.mError = function (message, options, short) {\n if (short === void 0) { short = false; }\n if (this.parent && this.parent.isKind('merror')) {\n return null;\n }\n var merror = this.factory.create('merror');\n if (options['fullErrors'] || short) {\n var mtext = this.factory.create('mtext');\n var text = this.factory.create('text');\n text.setText(options['fullErrors'] ? message : this.kind);\n mtext.appendChild(text);\n merror.appendChild(mtext);\n this.parent.replaceChild(merror, this);\n }\n else {\n this.parent.replaceChild(merror, this);\n merror.appendChild(this);\n }\n return merror;\n };\n AbstractMmlNode.defaults = {\n mathbackground: Attributes_js_1.INHERIT,\n mathcolor: Attributes_js_1.INHERIT,\n mathsize: Attributes_js_1.INHERIT,\n dir: Attributes_js_1.INHERIT\n };\n AbstractMmlNode.noInherit = {\n mstyle: {\n mpadded: { width: true, height: true, depth: true, lspace: true, voffset: true },\n mtable: { width: true, height: true, depth: true, align: true }\n },\n maligngroup: {\n mrow: { groupalign: true },\n mtable: { groupalign: true }\n }\n };\n AbstractMmlNode.alwaysInherit = {\n scriptminsize: true,\n scriptsizemultiplier: true\n };\n AbstractMmlNode.verifyDefaults = {\n checkArity: true,\n checkAttributes: false,\n fullErrors: false,\n fixMmultiscripts: true,\n fixMtables: true\n };\n return AbstractMmlNode;\n}(Node_js_1.AbstractNode));\nexports.AbstractMmlNode = AbstractMmlNode;\nvar AbstractMmlTokenNode = (function (_super) {\n __extends(AbstractMmlTokenNode, _super);\n function AbstractMmlTokenNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlTokenNode.prototype, \"isToken\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlTokenNode.prototype.getText = function () {\n var e_10, _a;\n var text = '';\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof TextNode) {\n text += child.getText();\n }\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_10) throw e_10.error; }\n }\n return text;\n };\n AbstractMmlTokenNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_11, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_11) throw e_11.error; }\n }\n };\n AbstractMmlTokenNode.prototype.walkTree = function (func, data) {\n var e_12, _a;\n func(this, data);\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.walkTree(func, data);\n }\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_12) throw e_12.error; }\n }\n return data;\n };\n AbstractMmlTokenNode.defaults = __assign(__assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: Attributes_js_1.INHERIT });\n return AbstractMmlTokenNode;\n}(AbstractMmlNode));\nexports.AbstractMmlTokenNode = AbstractMmlTokenNode;\nvar AbstractMmlLayoutNode = (function (_super) {\n __extends(AbstractMmlLayoutNode, _super);\n function AbstractMmlLayoutNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isSpacelike\", {\n get: function () {\n return this.childNodes[0].isSpacelike;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"arity\", {\n get: function () {\n return -1;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlLayoutNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlLayoutNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlLayoutNode.prototype.setTeXclass = function (prev) {\n prev = this.childNodes[0].setTeXclass(prev);\n this.updateTeXclass(this.childNodes[0]);\n return prev;\n };\n AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlLayoutNode;\n}(AbstractMmlNode));\nexports.AbstractMmlLayoutNode = AbstractMmlLayoutNode;\nvar AbstractMmlBaseNode = (function (_super) {\n __extends(AbstractMmlBaseNode, _super);\n function AbstractMmlBaseNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlBaseNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlBaseNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlBaseNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlBaseNode.prototype.setTeXclass = function (prev) {\n var e_13, _a;\n this.getPrevClass(prev);\n this.texClass = exports.TEXCLASS.ORD;\n var base = this.childNodes[0];\n if (base) {\n if (this.isEmbellished || base.isKind('mi')) {\n prev = base.setTeXclass(prev);\n this.updateTeXclass(this.core());\n }\n else {\n base.setTeXclass(null);\n prev = this;\n }\n }\n else {\n prev = this;\n }\n try {\n for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child) {\n child.setTeXclass(null);\n }\n }\n }\n catch (e_13_1) { e_13 = { error: e_13_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_13) throw e_13.error; }\n }\n return prev;\n };\n AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlBaseNode;\n}(AbstractMmlNode));\nexports.AbstractMmlBaseNode = AbstractMmlBaseNode;\nvar AbstractMmlEmptyNode = (function (_super) {\n __extends(AbstractMmlEmptyNode, _super);\n function AbstractMmlEmptyNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"arity\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"Parent\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"texClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevLevel\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.hasSpacingAttributes = function () {\n return false;\n };\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"attributes\", {\n get: function () {\n return null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.core = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.childPosition = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.setTeXclass = function (prev) {\n return prev;\n };\n AbstractMmlEmptyNode.prototype.texSpacing = function () {\n return '';\n };\n AbstractMmlEmptyNode.prototype.setInheritedAttributes = function (_attributes, _display, _level, _prime) { };\n AbstractMmlEmptyNode.prototype.inheritAttributesFrom = function (_node) { };\n AbstractMmlEmptyNode.prototype.verifyTree = function (_options) { };\n AbstractMmlEmptyNode.prototype.mError = function (_message, _options, _short) {\n if (_short === void 0) { _short = false; }\n };\n return AbstractMmlEmptyNode;\n}(Node_js_1.AbstractEmptyNode));\nexports.AbstractMmlEmptyNode = AbstractMmlEmptyNode;\nvar TextNode = (function (_super) {\n __extends(TextNode, _super);\n function TextNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.text = '';\n return _this;\n }\n Object.defineProperty(TextNode.prototype, \"kind\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n TextNode.prototype.getText = function () {\n return this.text;\n };\n TextNode.prototype.setText = function (text) {\n this.text = text;\n return this;\n };\n TextNode.prototype.copy = function () {\n return this.factory.create(this.kind).setText(this.getText());\n };\n TextNode.prototype.toString = function () {\n return this.text;\n };\n return TextNode;\n}(AbstractMmlEmptyNode));\nexports.TextNode = TextNode;\nvar XMLNode = (function (_super) {\n __extends(XMLNode, _super);\n function XMLNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.xml = null;\n _this.adaptor = null;\n return _this;\n }\n Object.defineProperty(XMLNode.prototype, \"kind\", {\n get: function () {\n return 'XML';\n },\n enumerable: false,\n configurable: true\n });\n XMLNode.prototype.getXML = function () {\n return this.xml;\n };\n XMLNode.prototype.setXML = function (xml, adaptor) {\n if (adaptor === void 0) { adaptor = null; }\n this.xml = xml;\n this.adaptor = adaptor;\n return this;\n };\n XMLNode.prototype.getSerializedXML = function () {\n return this.adaptor.serializeXML(this.xml);\n };\n XMLNode.prototype.copy = function () {\n return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));\n };\n XMLNode.prototype.toString = function () {\n return 'XML data';\n };\n return XMLNode;\n}(AbstractMmlEmptyNode));\nexports.XMLNode = XMLNode;\n//# sourceMappingURL=MmlNode.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/core/MmlTree/MmlNode.js?"); +eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.XMLNode = exports.TextNode = exports.AbstractMmlEmptyNode = exports.AbstractMmlBaseNode = exports.AbstractMmlLayoutNode = exports.AbstractMmlTokenNode = exports.AbstractMmlNode = exports.indentAttributes = exports.TEXCLASSNAMES = exports.TEXCLASS = void 0;\nvar Attributes_js_1 = __webpack_require__(/*! ./Attributes.js */ 382);\nvar Node_js_1 = __webpack_require__(/*! ../Tree/Node.js */ 1148);\nexports.TEXCLASS = {\n ORD: 0,\n OP: 1,\n BIN: 2,\n REL: 3,\n OPEN: 4,\n CLOSE: 5,\n PUNCT: 6,\n INNER: 7,\n VCENTER: 8,\n NONE: -1\n};\nexports.TEXCLASSNAMES = ['ORD', 'OP', 'BIN', 'REL', 'OPEN', 'CLOSE', 'PUNCT', 'INNER', 'VCENTER'];\nvar TEXSPACELENGTH = ['', 'thinmathspace', 'mediummathspace', 'thickmathspace'];\nvar TEXSPACE = [\n [0, -1, 2, 3, 0, 0, 0, 1],\n [-1, -1, 0, 3, 0, 0, 0, 1],\n [2, 2, 0, 0, 2, 0, 0, 2],\n [3, 3, 0, 0, 3, 0, 0, 3],\n [0, 0, 0, 0, 0, 0, 0, 0],\n [0, -1, 2, 3, 0, 0, 0, 1],\n [1, 1, 0, 1, 1, 1, 1, 1],\n [1, -1, 2, 3, 1, 0, 1, 1]\n];\nexports.indentAttributes = [\n 'indentalign', 'indentalignfirst',\n 'indentshift', 'indentshiftfirst'\n];\nvar AbstractMmlNode = (function (_super) {\n __extends(AbstractMmlNode, _super);\n function AbstractMmlNode(factory, attributes, children) {\n if (attributes === void 0) { attributes = {}; }\n if (children === void 0) { children = []; }\n var _this = _super.call(this, factory) || this;\n _this.prevClass = null;\n _this.prevLevel = null;\n _this.texclass = null;\n if (_this.arity < 0) {\n _this.childNodes = [factory.create('inferredMrow')];\n _this.childNodes[0].parent = _this;\n }\n _this.setChildren(children);\n _this.attributes = new Attributes_js_1.Attributes(factory.getNodeClass(_this.kind).defaults, factory.getNodeClass('math').defaults);\n _this.attributes.setList(attributes);\n return _this;\n }\n AbstractMmlNode.prototype.copy = function (keepIds) {\n var e_1, _a, e_2, _b;\n if (keepIds === void 0) { keepIds = false; }\n var node = this.factory.create(this.kind);\n node.properties = __assign({}, this.properties);\n if (this.attributes) {\n var attributes = this.attributes.getAllAttributes();\n try {\n for (var _c = __values(Object.keys(attributes)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (name_1 !== 'id' || keepIds) {\n node.attributes.set(name_1, attributes[name_1]);\n }\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n if (this.childNodes && this.childNodes.length) {\n var children = this.childNodes;\n if (children.length === 1 && children[0].isInferred) {\n children = children[0].childNodes;\n }\n try {\n for (var children_1 = __values(children), children_1_1 = children_1.next(); !children_1_1.done; children_1_1 = children_1.next()) {\n var child = children_1_1.value;\n if (child) {\n node.appendChild(child.copy());\n }\n else {\n node.childNodes.push(null);\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (children_1_1 && !children_1_1.done && (_b = children_1.return)) _b.call(children_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n return node;\n };\n Object.defineProperty(AbstractMmlNode.prototype, \"texClass\", {\n get: function () {\n return this.texclass;\n },\n set: function (texClass) {\n this.texclass = texClass;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"arity\", {\n get: function () {\n return Infinity;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"Parent\", {\n get: function () {\n var parent = this.parent;\n while (parent && parent.notParent) {\n parent = parent.Parent;\n }\n return parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlNode.prototype.setChildren = function (children) {\n if (this.arity < 0) {\n return this.childNodes[0].setChildren(children);\n }\n return _super.prototype.setChildren.call(this, children);\n };\n AbstractMmlNode.prototype.appendChild = function (child) {\n var e_3, _a;\n var _this = this;\n if (this.arity < 0) {\n this.childNodes[0].appendChild(child);\n return child;\n }\n if (child.isInferred) {\n if (this.arity === Infinity) {\n child.childNodes.forEach(function (node) { return _super.prototype.appendChild.call(_this, node); });\n return child;\n }\n var original = child;\n child = this.factory.create('mrow');\n child.setChildren(original.childNodes);\n child.attributes = original.attributes;\n try {\n for (var _b = __values(original.getPropertyNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_2 = _c.value;\n child.setProperty(name_2, original.getProperty(name_2));\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n return _super.prototype.appendChild.call(this, child);\n };\n AbstractMmlNode.prototype.replaceChild = function (newChild, oldChild) {\n if (this.arity < 0) {\n this.childNodes[0].replaceChild(newChild, oldChild);\n return newChild;\n }\n return _super.prototype.replaceChild.call(this, newChild, oldChild);\n };\n AbstractMmlNode.prototype.core = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlNode.prototype.childPosition = function () {\n var e_4, _a;\n var child = this;\n var parent = child.parent;\n while (parent && parent.notParent) {\n child = parent;\n parent = parent.parent;\n }\n if (parent) {\n var i = 0;\n try {\n for (var _b = __values(parent.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var node = _c.value;\n if (node === child) {\n return i;\n }\n i++;\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n return null;\n };\n AbstractMmlNode.prototype.setTeXclass = function (prev) {\n this.getPrevClass(prev);\n return (this.texClass != null ? this : prev);\n };\n AbstractMmlNode.prototype.updateTeXclass = function (core) {\n if (core) {\n this.prevClass = core.prevClass;\n this.prevLevel = core.prevLevel;\n core.prevClass = core.prevLevel = null;\n this.texClass = core.texClass;\n }\n };\n AbstractMmlNode.prototype.getPrevClass = function (prev) {\n if (prev) {\n this.prevClass = prev.texClass;\n this.prevLevel = prev.attributes.get('scriptlevel');\n }\n };\n AbstractMmlNode.prototype.texSpacing = function () {\n var prevClass = (this.prevClass != null ? this.prevClass : exports.TEXCLASS.NONE);\n var texClass = this.texClass || exports.TEXCLASS.ORD;\n if (prevClass === exports.TEXCLASS.NONE || texClass === exports.TEXCLASS.NONE) {\n return '';\n }\n if (prevClass === exports.TEXCLASS.VCENTER) {\n prevClass = exports.TEXCLASS.ORD;\n }\n if (texClass === exports.TEXCLASS.VCENTER) {\n texClass = exports.TEXCLASS.ORD;\n }\n var space = TEXSPACE[prevClass][texClass];\n if ((this.prevLevel > 0 || this.attributes.get('scriptlevel') > 0) && space >= 0) {\n return '';\n }\n return TEXSPACELENGTH[Math.abs(space)];\n };\n AbstractMmlNode.prototype.hasSpacingAttributes = function () {\n return this.isEmbellished && this.coreMO().hasSpacingAttributes();\n };\n AbstractMmlNode.prototype.setInheritedAttributes = function (attributes, display, level, prime) {\n var e_5, _a;\n if (attributes === void 0) { attributes = {}; }\n if (display === void 0) { display = false; }\n if (level === void 0) { level = 0; }\n if (prime === void 0) { prime = false; }\n var defaults = this.attributes.getAllDefaults();\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var key = _c.value;\n if (defaults.hasOwnProperty(key) || AbstractMmlNode.alwaysInherit.hasOwnProperty(key)) {\n var _d = __read(attributes[key], 2), node = _d[0], value = _d[1];\n var noinherit = (AbstractMmlNode.noInherit[node] || {})[this.kind] || {};\n if (!noinherit[key]) {\n this.attributes.setInherited(key, value);\n }\n }\n }\n }\n catch (e_5_1) { e_5 = { error: e_5_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_5) throw e_5.error; }\n }\n var displaystyle = this.attributes.getExplicit('displaystyle');\n if (displaystyle === undefined) {\n this.attributes.setInherited('displaystyle', display);\n }\n var scriptlevel = this.attributes.getExplicit('scriptlevel');\n if (scriptlevel === undefined) {\n this.attributes.setInherited('scriptlevel', level);\n }\n if (prime) {\n this.setProperty('texprimestyle', prime);\n }\n var arity = this.arity;\n if (arity >= 0 && arity !== Infinity && ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n if (arity < this.childNodes.length) {\n this.childNodes = this.childNodes.slice(0, arity);\n }\n else {\n while (this.childNodes.length < arity) {\n this.appendChild(this.factory.create('mrow'));\n }\n }\n }\n this.setChildInheritedAttributes(attributes, display, level, prime);\n };\n AbstractMmlNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_6, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n catch (e_6_1) { e_6 = { error: e_6_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_6) throw e_6.error; }\n }\n };\n AbstractMmlNode.prototype.addInheritedAttributes = function (current, attributes) {\n var e_7, _a;\n var updated = __assign({}, current);\n try {\n for (var _b = __values(Object.keys(attributes)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_3 = _c.value;\n if (name_3 !== 'displaystyle' && name_3 !== 'scriptlevel' && name_3 !== 'style') {\n updated[name_3] = [this.kind, attributes[name_3]];\n }\n }\n }\n catch (e_7_1) { e_7 = { error: e_7_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_7) throw e_7.error; }\n }\n return updated;\n };\n AbstractMmlNode.prototype.inheritAttributesFrom = function (node) {\n var attributes = node.attributes;\n var display = attributes.get('displaystyle');\n var scriptlevel = attributes.get('scriptlevel');\n var defaults = (!attributes.isSet('mathsize') ? {} : {\n mathsize: ['math', attributes.get('mathsize')]\n });\n var prime = node.getProperty('texprimestyle') || false;\n this.setInheritedAttributes(defaults, display, scriptlevel, prime);\n };\n AbstractMmlNode.prototype.verifyTree = function (options) {\n if (options === void 0) { options = null; }\n if (options === null) {\n return;\n }\n this.verifyAttributes(options);\n var arity = this.arity;\n if (options['checkArity']) {\n if (arity >= 0 && arity !== Infinity &&\n ((arity === 1 && this.childNodes.length === 0) ||\n (arity !== 1 && this.childNodes.length !== arity))) {\n this.mError('Wrong number of children for \"' + this.kind + '\" node', options, true);\n }\n }\n this.verifyChildren(options);\n };\n AbstractMmlNode.prototype.verifyAttributes = function (options) {\n var e_8, _a;\n if (options['checkAttributes']) {\n var attributes = this.attributes;\n var bad = [];\n try {\n for (var _b = __values(attributes.getExplicitNames()), _c = _b.next(); !_c.done; _c = _b.next()) {\n var name_4 = _c.value;\n if (name_4.substr(0, 5) !== 'data-' && attributes.getDefault(name_4) === undefined &&\n !name_4.match(/^(?:class|style|id|(?:xlink:)?href)$/)) {\n bad.push(name_4);\n }\n }\n }\n catch (e_8_1) { e_8 = { error: e_8_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_8) throw e_8.error; }\n }\n if (bad.length) {\n this.mError('Unknown attributes for ' + this.kind + ' node: ' + bad.join(', '), options);\n }\n }\n };\n AbstractMmlNode.prototype.verifyChildren = function (options) {\n var e_9, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.verifyTree(options);\n }\n }\n catch (e_9_1) { e_9 = { error: e_9_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_9) throw e_9.error; }\n }\n };\n AbstractMmlNode.prototype.mError = function (message, options, short) {\n if (short === void 0) { short = false; }\n if (this.parent && this.parent.isKind('merror')) {\n return null;\n }\n var merror = this.factory.create('merror');\n if (options['fullErrors'] || short) {\n var mtext = this.factory.create('mtext');\n var text = this.factory.create('text');\n text.setText(options['fullErrors'] ? message : this.kind);\n mtext.appendChild(text);\n merror.appendChild(mtext);\n this.parent.replaceChild(merror, this);\n }\n else {\n this.parent.replaceChild(merror, this);\n merror.appendChild(this);\n }\n return merror;\n };\n AbstractMmlNode.defaults = {\n mathbackground: Attributes_js_1.INHERIT,\n mathcolor: Attributes_js_1.INHERIT,\n mathsize: Attributes_js_1.INHERIT,\n dir: Attributes_js_1.INHERIT\n };\n AbstractMmlNode.noInherit = {\n mstyle: {\n mpadded: { width: true, height: true, depth: true, lspace: true, voffset: true },\n mtable: { width: true, height: true, depth: true, align: true }\n },\n maligngroup: {\n mrow: { groupalign: true },\n mtable: { groupalign: true }\n }\n };\n AbstractMmlNode.alwaysInherit = {\n scriptminsize: true,\n scriptsizemultiplier: true\n };\n AbstractMmlNode.verifyDefaults = {\n checkArity: true,\n checkAttributes: false,\n fullErrors: false,\n fixMmultiscripts: true,\n fixMtables: true\n };\n return AbstractMmlNode;\n}(Node_js_1.AbstractNode));\nexports.AbstractMmlNode = AbstractMmlNode;\nvar AbstractMmlTokenNode = (function (_super) {\n __extends(AbstractMmlTokenNode, _super);\n function AbstractMmlTokenNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlTokenNode.prototype, \"isToken\", {\n get: function () {\n return true;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlTokenNode.prototype.getText = function () {\n var e_10, _a;\n var text = '';\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof TextNode) {\n text += child.getText();\n }\n }\n }\n catch (e_10_1) { e_10 = { error: e_10_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_10) throw e_10.error; }\n }\n return text;\n };\n AbstractMmlTokenNode.prototype.setChildInheritedAttributes = function (attributes, display, level, prime) {\n var e_11, _a;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.setInheritedAttributes(attributes, display, level, prime);\n }\n }\n }\n catch (e_11_1) { e_11 = { error: e_11_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_11) throw e_11.error; }\n }\n };\n AbstractMmlTokenNode.prototype.walkTree = function (func, data) {\n var e_12, _a;\n func(this, data);\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child instanceof AbstractMmlNode) {\n child.walkTree(func, data);\n }\n }\n }\n catch (e_12_1) { e_12 = { error: e_12_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_12) throw e_12.error; }\n }\n return data;\n };\n AbstractMmlTokenNode.defaults = __assign(__assign({}, AbstractMmlNode.defaults), { mathvariant: 'normal', mathsize: Attributes_js_1.INHERIT });\n return AbstractMmlTokenNode;\n}(AbstractMmlNode));\nexports.AbstractMmlTokenNode = AbstractMmlTokenNode;\nvar AbstractMmlLayoutNode = (function (_super) {\n __extends(AbstractMmlLayoutNode, _super);\n function AbstractMmlLayoutNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isSpacelike\", {\n get: function () {\n return this.childNodes[0].isSpacelike;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlLayoutNode.prototype, \"arity\", {\n get: function () {\n return -1;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlLayoutNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlLayoutNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlLayoutNode.prototype.setTeXclass = function (prev) {\n prev = this.childNodes[0].setTeXclass(prev);\n this.updateTeXclass(this.childNodes[0]);\n return prev;\n };\n AbstractMmlLayoutNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlLayoutNode;\n}(AbstractMmlNode));\nexports.AbstractMmlLayoutNode = AbstractMmlLayoutNode;\nvar AbstractMmlBaseNode = (function (_super) {\n __extends(AbstractMmlBaseNode, _super);\n function AbstractMmlBaseNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlBaseNode.prototype, \"isEmbellished\", {\n get: function () {\n return this.childNodes[0].isEmbellished;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlBaseNode.prototype.core = function () {\n return this.childNodes[0];\n };\n AbstractMmlBaseNode.prototype.coreMO = function () {\n return this.childNodes[0].coreMO();\n };\n AbstractMmlBaseNode.prototype.setTeXclass = function (prev) {\n var e_13, _a;\n this.getPrevClass(prev);\n this.texClass = exports.TEXCLASS.ORD;\n var base = this.childNodes[0];\n if (base) {\n if (this.isEmbellished || base.isKind('mi')) {\n prev = base.setTeXclass(prev);\n this.updateTeXclass(this.core());\n }\n else {\n base.setTeXclass(null);\n prev = this;\n }\n }\n else {\n prev = this;\n }\n try {\n for (var _b = __values(this.childNodes.slice(1)), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n if (child) {\n child.setTeXclass(null);\n }\n }\n }\n catch (e_13_1) { e_13 = { error: e_13_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_13) throw e_13.error; }\n }\n return prev;\n };\n AbstractMmlBaseNode.defaults = AbstractMmlNode.defaults;\n return AbstractMmlBaseNode;\n}(AbstractMmlNode));\nexports.AbstractMmlBaseNode = AbstractMmlBaseNode;\nvar AbstractMmlEmptyNode = (function (_super) {\n __extends(AbstractMmlEmptyNode, _super);\n function AbstractMmlEmptyNode() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isToken\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isEmbellished\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isSpacelike\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"linebreakContainer\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"hasNewLine\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"arity\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"isInferred\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"notParent\", {\n get: function () {\n return false;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"Parent\", {\n get: function () {\n return this.parent;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"texClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevClass\", {\n get: function () {\n return exports.TEXCLASS.NONE;\n },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"prevLevel\", {\n get: function () {\n return 0;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.hasSpacingAttributes = function () {\n return false;\n };\n Object.defineProperty(AbstractMmlEmptyNode.prototype, \"attributes\", {\n get: function () {\n return null;\n },\n enumerable: false,\n configurable: true\n });\n AbstractMmlEmptyNode.prototype.core = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreMO = function () {\n return this;\n };\n AbstractMmlEmptyNode.prototype.coreIndex = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.childPosition = function () {\n return 0;\n };\n AbstractMmlEmptyNode.prototype.setTeXclass = function (prev) {\n return prev;\n };\n AbstractMmlEmptyNode.prototype.texSpacing = function () {\n return '';\n };\n AbstractMmlEmptyNode.prototype.setInheritedAttributes = function (_attributes, _display, _level, _prime) { };\n AbstractMmlEmptyNode.prototype.inheritAttributesFrom = function (_node) { };\n AbstractMmlEmptyNode.prototype.verifyTree = function (_options) { };\n AbstractMmlEmptyNode.prototype.mError = function (_message, _options, _short) {\n if (_short === void 0) { _short = false; }\n };\n return AbstractMmlEmptyNode;\n}(Node_js_1.AbstractEmptyNode));\nexports.AbstractMmlEmptyNode = AbstractMmlEmptyNode;\nvar TextNode = (function (_super) {\n __extends(TextNode, _super);\n function TextNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.text = '';\n return _this;\n }\n Object.defineProperty(TextNode.prototype, \"kind\", {\n get: function () {\n return 'text';\n },\n enumerable: false,\n configurable: true\n });\n TextNode.prototype.getText = function () {\n return this.text;\n };\n TextNode.prototype.setText = function (text) {\n this.text = text;\n return this;\n };\n TextNode.prototype.copy = function () {\n return this.factory.create(this.kind).setText(this.getText());\n };\n TextNode.prototype.toString = function () {\n return this.text;\n };\n return TextNode;\n}(AbstractMmlEmptyNode));\nexports.TextNode = TextNode;\nvar XMLNode = (function (_super) {\n __extends(XMLNode, _super);\n function XMLNode() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.xml = null;\n _this.adaptor = null;\n return _this;\n }\n Object.defineProperty(XMLNode.prototype, \"kind\", {\n get: function () {\n return 'XML';\n },\n enumerable: false,\n configurable: true\n });\n XMLNode.prototype.getXML = function () {\n return this.xml;\n };\n XMLNode.prototype.setXML = function (xml, adaptor) {\n if (adaptor === void 0) { adaptor = null; }\n this.xml = xml;\n this.adaptor = adaptor;\n return this;\n };\n XMLNode.prototype.getSerializedXML = function () {\n return this.adaptor.serializeXML(this.xml);\n };\n XMLNode.prototype.copy = function () {\n return this.factory.create(this.kind).setXML(this.adaptor.clone(this.xml));\n };\n XMLNode.prototype.toString = function () {\n return 'XML data';\n };\n return XMLNode;\n}(AbstractMmlEmptyNode));\nexports.XMLNode = XMLNode;\n//# sourceMappingURL=MmlNode.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/core/MmlTree/MmlNode.js?"); /***/ }), /* 65 */ @@ -282,7 +282,7 @@ eval("/* unused harmony export hexToRgb */\n/* unused harmony export decomposeCo /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 298);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/utils/useForkRef.js?"); +eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @mui/utils */ 299);\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (_mui_utils__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"]);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/utils/useForkRef.js?"); /***/ }), /* 67 */, @@ -296,34 +296,10 @@ eval("/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpa /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export overridesResolver */\n/* unused harmony export ListItemRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/utils */ 370);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/isMuiElement */ 259);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _listItemClasses__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./listItemClasses */ 293);\n/* harmony import */ var _ListItemButton__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ListItemButton */ 294);\n/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ListItemSecondaryAction */ 1365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"className\"],\n _excluded2 = [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"disablePadding\", \"divider\", \"focusVisibleClassName\", \"secondaryAction\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters, !ownerState.disablePadding && styles.padding, ownerState.button && styles.button, ownerState.hasSecondaryAction && styles.secondaryAction];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n button,\n classes,\n dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', !disablePadding && 'padding', divider && 'divider', disabled && 'disabled', button && 'button', alignItems === 'flex-start' && 'alignItemsFlexStart', hasSecondaryAction && 'secondaryAction', selected && 'selected'],\n container: ['container']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* getListItemUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('div', {\n name: 'MuiListItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left'\n}, !ownerState.disablePadding && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.dense && {\n paddingTop: 4,\n paddingBottom: 4\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, !!ownerState.secondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}), !!ownerState.secondaryAction && {\n [`& > .${_ListItemButton__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"].root}`]: {\n paddingRight: 48\n }\n}, {\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.alignItems === 'flex-start' && {\n alignItems: 'flex-start'\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, ownerState.button && {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n }\n}, ownerState.hasSecondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}));\nconst ListItemContainer = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('li', {\n name: 'MuiListItem',\n slot: 'Container',\n overridesResolver: (props, styles) => styles.container\n})({\n position: 'relative'\n});\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nconst ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItem'\n });\n\n const {\n alignItems = 'center',\n autoFocus = false,\n button = false,\n children: childrenProp,\n className,\n component: componentProp,\n components = {},\n componentsProps = {},\n ContainerComponent = 'li',\n ContainerProps: {\n className: ContainerClassName\n } = {},\n dense = false,\n disabled = false,\n disableGutters = false,\n disablePadding = false,\n divider = false,\n focusVisibleClassName,\n secondaryAction,\n selected = false\n } = props,\n ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props.ContainerProps, _excluded),\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded2);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n };\n const listItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(childrenProp); // v4 implementation, deprecated in v5, will be removed in v6\n\n const hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(children[children.length - 1], ['ListItemSecondaryAction']);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems,\n autoFocus,\n button,\n dense: childContext.dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n });\n\n const classes = useUtilityClasses(ownerState);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(listItemRef, ref);\n const Root = components.Root || ListItemRoot;\n const rootProps = componentsProps.root || {};\n\n const componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n disabled\n }, other);\n\n let Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible, focusVisibleClassName);\n Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"];\n } // v4 implementation, deprecated in v5, will be removed in v6\n\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(ListItemContainer, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: ContainerComponent,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.container, ContainerClassName),\n ref: handleRef,\n ownerState: ownerState\n }, ContainerProps, {\n children: [/*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n as: Component,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: children\n })), children.pop()]\n }))\n });\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, {\n as: Component,\n ref: handleRef,\n ownerState: ownerState\n }, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: [children, secondaryAction && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n children: secondaryAction\n })]\n }))\n });\n});\n true ? ListItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'flex-start']),\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item is a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n button: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n let secondaryActionIndex = -1;\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i];\n\n if (Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n * @default 'li'\n * @deprecated\n */\n ContainerComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n\n /**\n * Props applied to the container component if used.\n * @default {}\n * @deprecated\n */\n ContainerProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, all padding is removed.\n * @default false\n */\n disablePadding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The element to display at the end of ListItem.\n */\n secondaryAction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Use to apply selected styling.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItem/ListItem.js?"); +eval("/* unused harmony export overridesResolver */\n/* unused harmony export ListItemRoot */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 98);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @mui/utils */ 372);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../ButtonBase */ 300);\n/* harmony import */ var _utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../utils/isMuiElement */ 260);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../List/ListContext */ 130);\n/* harmony import */ var _listItemClasses__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./listItemClasses */ 294);\n/* harmony import */ var _ListItemButton__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../ListItemButton */ 295);\n/* harmony import */ var _ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../ListItemSecondaryAction */ 1368);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"className\"],\n _excluded2 = [\"alignItems\", \"autoFocus\", \"button\", \"children\", \"className\", \"component\", \"components\", \"componentsProps\", \"ContainerComponent\", \"ContainerProps\", \"dense\", \"disabled\", \"disableGutters\", \"disablePadding\", \"divider\", \"focusVisibleClassName\", \"secondaryAction\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters, !ownerState.disablePadding && styles.padding, ownerState.button && styles.button, ownerState.hasSecondaryAction && styles.secondaryAction];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n button,\n classes,\n dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', !disableGutters && 'gutters', !disablePadding && 'padding', divider && 'divider', disabled && 'disabled', button && 'button', alignItems === 'flex-start' && 'alignItemsFlexStart', hasSecondaryAction && 'secondaryAction', selected && 'selected'],\n container: ['container']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* getListItemUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('div', {\n name: 'MuiListItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n width: '100%',\n boxSizing: 'border-box',\n textAlign: 'left'\n}, !ownerState.disablePadding && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n paddingTop: 8,\n paddingBottom: 8\n}, ownerState.dense && {\n paddingTop: 4,\n paddingBottom: 4\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, !!ownerState.secondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}), !!ownerState.secondaryAction && {\n [`& > .${_ListItemButton__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"].root}`]: {\n paddingRight: 48\n }\n}, {\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n }\n}, ownerState.alignItems === 'flex-start' && {\n alignItems: 'flex-start'\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, ownerState.button && {\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_9__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n }\n}, ownerState.hasSecondaryAction && {\n // Add some space to avoid collision as `ListItemSecondaryAction`\n // is absolutely positioned.\n paddingRight: 48\n}));\nconst ListItemContainer = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])('li', {\n name: 'MuiListItem',\n slot: 'Container',\n overridesResolver: (props, styles) => styles.container\n})({\n position: 'relative'\n});\n/**\n * Uses an additional container component if `ListItemSecondaryAction` is the last child.\n */\n\nconst ListItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItem'\n });\n\n const {\n alignItems = 'center',\n autoFocus = false,\n button = false,\n children: childrenProp,\n className,\n component: componentProp,\n components = {},\n componentsProps = {},\n ContainerComponent = 'li',\n ContainerProps: {\n className: ContainerClassName\n } = {},\n dense = false,\n disabled = false,\n disableGutters = false,\n disablePadding = false,\n divider = false,\n focusVisibleClassName,\n secondaryAction,\n selected = false\n } = props,\n ContainerProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props.ContainerProps, _excluded),\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded2);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n alignItems,\n disableGutters\n };\n const listItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (listItemRef.current) {\n listItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a ListItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(childrenProp); // v4 implementation, deprecated in v5, will be removed in v6\n\n const hasSecondaryAction = children.length && Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(children[children.length - 1], ['ListItemSecondaryAction']);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems,\n autoFocus,\n button,\n dense: childContext.dense,\n disabled,\n disableGutters,\n disablePadding,\n divider,\n hasSecondaryAction,\n selected\n });\n\n const classes = useUtilityClasses(ownerState);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(listItemRef, ref);\n const Root = components.Root || ListItemRoot;\n const rootProps = componentsProps.root || {};\n\n const componentProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, rootProps.className, className),\n disabled\n }, other);\n\n let Component = componentProp || 'li';\n\n if (button) {\n componentProps.component = componentProp || 'div';\n componentProps.focusVisibleClassName = Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(_listItemClasses__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"].focusVisible, focusVisibleClassName);\n Component = _ButtonBase__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"];\n } // v4 implementation, deprecated in v5, will be removed in v6\n\n\n if (hasSecondaryAction) {\n // Use div by default.\n Component = !componentProps.component && !componentProp ? 'div' : Component; // Avoid nesting of li > li.\n\n if (ContainerComponent === 'li') {\n if (Component === 'li') {\n Component = 'div';\n } else if (componentProps.component === 'li') {\n componentProps.component = 'div';\n }\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(ListItemContainer, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: ContainerComponent,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.container, ContainerClassName),\n ref: handleRef,\n ownerState: ownerState\n }, ContainerProps, {\n children: [/*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n as: Component,\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: children\n })), children.pop()]\n }))\n });\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(Root, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, rootProps, {\n as: Component,\n ref: handleRef,\n ownerState: ownerState\n }, !Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(Root) && {\n ownerState: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState, rootProps.ownerState)\n }, componentProps, {\n children: [children, secondaryAction && /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(_ListItemSecondaryAction__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"], {\n children: secondaryAction\n })]\n }))\n });\n});\n true ? ListItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Defines the `align-items` style property.\n * @default 'center'\n */\n alignItems: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['center', 'flex-start']),\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the list item is a button (using `ButtonBase`). Props intended\n * for `ButtonBase` can then be applied to `ListItem`.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n button: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component if a `ListItemSecondaryAction` is used it must\n * be the last child.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const children = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children); // React.Children.toArray(props.children).findLastIndex(isListItemSecondaryAction)\n\n let secondaryActionIndex = -1;\n\n for (let i = children.length - 1; i >= 0; i -= 1) {\n const child = children[i];\n\n if (Object(_utils_isMuiElement__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"])(child, ['ListItemSecondaryAction'])) {\n secondaryActionIndex = i;\n break;\n }\n } // is ListItemSecondaryAction the last child of ListItem\n\n\n if (secondaryActionIndex !== -1 && secondaryActionIndex !== children.length - 1) {\n return new Error('Material-UI: You used an element after ListItemSecondaryAction. ' + 'For ListItem to detect that it has a secondary action ' + 'you must pass it as the last child to ListItem.');\n }\n\n return null;\n }),\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * The components used for each slot inside the InputBase.\n * Either a string to use a HTML element or a component.\n * @default {}\n */\n components: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.shape({\n Root: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType\n }),\n\n /**\n * The props used for each slot inside the Input.\n * @default {}\n */\n componentsProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The container component used when a `ListItemSecondaryAction` is the last child.\n * @default 'li'\n * @deprecated\n */\n ContainerComponent: _mui_utils__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"],\n\n /**\n * Props applied to the container component if used.\n * @default {}\n * @deprecated\n */\n ContainerProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent List component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the component is disabled.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, all padding is removed.\n * @default false\n */\n disablePadding: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the list item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The element to display at the end of ListItem.\n */\n secondaryAction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Use to apply selected styling.\n * @default false\n * @deprecated checkout [ListItemButton](/api/list-item-button/) instead\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItem/ListItem.js?"); /***/ }), /* 70 */ -/*!********************************************************!*\ - !*** ./node_modules/@mui/icons-material/ExpandMore.js ***! - \********************************************************/ -/*! no static exports found */ -/*! exports used: default */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 72);\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ 73));\n\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ 7);\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n}), 'ExpandMore');\n\nexports.default = _default;\n\n//# sourceURL=webpack:///./node_modules/@mui/icons-material/ExpandMore.js?"); - -/***/ }), -/* 71 */ -/*!*************************************************!*\ - !*** ./node_modules/@mui/material/Grid/Grid.js ***! - \*************************************************/ -/*! exports provided: generateRowGap, generateColumnGap, default */ -/*! exports used: default */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -eval("/* unused harmony export generateRowGap */\n/* unused harmony export generateColumnGap */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 114);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/requirePropFactory */ 428);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _GridContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GridContext */ 553);\n/* harmony import */ var _gridClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gridClasses */ 410);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"lg\", \"md\", \"rowSpacing\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"];\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\n\nfunction generateGrid(globalStyles, theme, breakpoint, ownerState) {\n const size = ownerState[breakpoint];\n\n if (!size) {\n return;\n }\n\n let styles = {};\n\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* resolveBreakpointValues */ \"d\"])({\n values: ownerState.columns,\n base: theme.breakpoints.values\n }); // Keep 7 significant numbers.\n\n const width = `${Math.round(size / columnsBreakpointValues[breakpoint] * 10e7) / 10e5}%`;\n let more = {};\n\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n } // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n\n styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n } // No need for a media query for the first size.\n\n\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction generateDirection({\n theme,\n ownerState\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, ownerState.direction, propValue => {\n const output = {\n flexDirection: propValue\n };\n\n if (propValue.indexOf('column') === 0) {\n output[`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`] = {\n maxWidth: 'none'\n };\n }\n\n return output;\n });\n}\n\nfunction generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n\n if (container && rowSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, rowSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n}\nfunction generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n\n if (container && columnSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, columnSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\nconst GridRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = props.ownerState;\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, container && spacing !== 0 && styles[`spacing-xs-${String(spacing)}`], direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap === 'nowrap' && {\n flexWrap: 'nowrap'\n}, ownerState.wrap === 'reverse' && {\n flexWrap: 'wrap-reverse'\n}), generateDirection, generateRowGap, generateColumnGap, ({\n theme,\n ownerState\n}) => theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n generateGrid(globalStyles, theme, breakpoint, ownerState);\n return globalStyles;\n}, {}));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = ownerState;\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', container && spacing !== 0 && `spacing-xs-${String(spacing)}`, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* getGridUtilityClass */ \"b\"], classes);\n};\n\nconst Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Grid(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiGrid'\n });\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(themeProps);\n\n const {\n className,\n columns: columnsProp = 12,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n lg = false,\n md = false,\n rowSpacing: rowSpacingProp,\n sm = false,\n spacing = 0,\n wrap = 'wrap',\n xl = false,\n xs = false,\n zeroMinWidth = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columns = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]) || columnsProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n columns,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n rowSpacing,\n columnSpacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const wrapChild = element => columns !== 12 ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].Provider, {\n value: columns,\n children: element\n }) : element;\n\n return wrapChild( /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(GridRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n as: component,\n ref: ref\n }, other)));\n});\n true ? Grid.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of columns.\n * @default 12\n */\n columns: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n * @default false\n */\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n\nif (true) {\n const requireProp = Object(_utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('Grid', Grid); // eslint-disable-next-line no-useless-concat\n\n Grid['propTypes' + ''] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Grid);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Grid/Grid.js?"); - -/***/ }), -/* 72 */ /*!**********************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***! \**********************************************************************/ @@ -334,7 +310,7 @@ eval("/* unused harmony export generateRowGap */\n/* unused harmony export gener eval("function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n \"default\": obj\n };\n}\n\nmodule.exports = _interopRequireDefault;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n//# sourceURL=webpack:///./node_modules/@babel/runtime/helpers/interopRequireDefault.js?"); /***/ }), -/* 73 */ +/* 71 */ /*!*****************************************************************!*\ !*** ./node_modules/@mui/icons-material/utils/createSvgIcon.js ***! \*****************************************************************/ @@ -343,7 +319,31 @@ eval("function _interopRequireDefault(obj) {\n return obj && obj.__esModule ? o /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\n\nvar _utils = __webpack_require__(/*! @mui/material/utils */ 422);\n\n//# sourceURL=webpack:///./node_modules/@mui/icons-material/utils/createSvgIcon.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nObject.defineProperty(exports, \"default\", {\n enumerable: true,\n get: function () {\n return _utils.createSvgIcon;\n }\n});\n\nvar _utils = __webpack_require__(/*! @mui/material/utils */ 423);\n\n//# sourceURL=webpack:///./node_modules/@mui/icons-material/utils/createSvgIcon.js?"); + +/***/ }), +/* 72 */ +/*!********************************************************!*\ + !*** ./node_modules/@mui/icons-material/ExpandMore.js ***! + \********************************************************/ +/*! no static exports found */ +/*! exports used: default */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +eval("\n\nvar _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ 70);\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar _createSvgIcon = _interopRequireDefault(__webpack_require__(/*! ./utils/createSvgIcon */ 71));\n\nvar _jsxRuntime = __webpack_require__(/*! react/jsx-runtime */ 7);\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z\"\n}), 'ExpandMore');\n\nexports.default = _default;\n\n//# sourceURL=webpack:///./node_modules/@mui/icons-material/ExpandMore.js?"); + +/***/ }), +/* 73 */ +/*!*************************************************!*\ + !*** ./node_modules/@mui/material/Grid/Grid.js ***! + \*************************************************/ +/*! exports provided: generateRowGap, generateColumnGap, default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* unused harmony export generateRowGap */\n/* unused harmony export generateColumnGap */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/system */ 114);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 580);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../utils/requirePropFactory */ 429);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _GridContext__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GridContext */ 553);\n/* harmony import */ var _gridClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./gridClasses */ 411);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"className\", \"columns\", \"columnSpacing\", \"component\", \"container\", \"direction\", \"item\", \"lg\", \"md\", \"rowSpacing\", \"sm\", \"spacing\", \"wrap\", \"xl\", \"xs\", \"zeroMinWidth\"];\n// A grid component using the following libs as inspiration.\n//\n// For the implementation:\n// - https://getbootstrap.com/docs/4.3/layout/grid/\n// - https://github.com/kristoferjoseph/flexboxgrid/blob/master/src/css/flexboxgrid.css\n// - https://github.com/roylee0704/react-flexbox-grid\n// - https://material.angularjs.org/latest/layout/introduction\n//\n// Follow this flexbox Guide to better understand the underlying model:\n// - https://css-tricks.com/snippets/css/a-guide-to-flexbox/\n\n\n\n\n\n\n\n\n\n\n\n\nfunction getOffset(val) {\n const parse = parseFloat(val);\n return `${parse}${String(val).replace(String(parse), '') || 'px'}`;\n}\n\nfunction generateGrid(globalStyles, theme, breakpoint, ownerState) {\n const size = ownerState[breakpoint];\n\n if (!size) {\n return;\n }\n\n let styles = {};\n\n if (size === true) {\n // For the auto layouting\n styles = {\n flexBasis: 0,\n flexGrow: 1,\n maxWidth: '100%'\n };\n } else if (size === 'auto') {\n styles = {\n flexBasis: 'auto',\n flexGrow: 0,\n flexShrink: 0,\n maxWidth: 'none',\n width: 'auto'\n };\n } else {\n const columnsBreakpointValues = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* resolveBreakpointValues */ \"d\"])({\n values: ownerState.columns,\n base: theme.breakpoints.values\n }); // Keep 7 significant numbers.\n\n const width = `${Math.round(size / columnsBreakpointValues[breakpoint] * 10e7) / 10e5}%`;\n let more = {};\n\n if (ownerState.container && ownerState.item && ownerState.columnSpacing !== 0) {\n const themeSpacing = theme.spacing(ownerState.columnSpacing);\n\n if (themeSpacing !== '0px') {\n const fullWidth = `calc(${width} + ${getOffset(themeSpacing)})`;\n more = {\n flexBasis: fullWidth,\n maxWidth: fullWidth\n };\n }\n } // Close to the bootstrap implementation:\n // https://github.com/twbs/bootstrap/blob/8fccaa2439e97ec72a4b7dc42ccc1f649790adb0/scss/mixins/_grid.scss#L41\n\n\n styles = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flexBasis: width,\n flexGrow: 0,\n maxWidth: width\n }, more);\n } // No need for a media query for the first size.\n\n\n if (theme.breakpoints.values[breakpoint] === 0) {\n Object.assign(globalStyles, styles);\n } else {\n globalStyles[theme.breakpoints.up(breakpoint)] = styles;\n }\n}\n\nfunction generateDirection({\n theme,\n ownerState\n}) {\n return Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, ownerState.direction, propValue => {\n const output = {\n flexDirection: propValue\n };\n\n if (propValue.indexOf('column') === 0) {\n output[`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`] = {\n maxWidth: 'none'\n };\n }\n\n return output;\n });\n}\n\nfunction generateRowGap({\n theme,\n ownerState\n}) {\n const {\n container,\n rowSpacing\n } = ownerState;\n let styles = {};\n\n if (container && rowSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, rowSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n marginTop: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingTop: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n}\nfunction generateColumnGap({\n theme,\n ownerState\n}) {\n const {\n container,\n columnSpacing\n } = ownerState;\n let styles = {};\n\n if (container && columnSpacing !== 0) {\n styles = Object(_mui_system__WEBPACK_IMPORTED_MODULE_5__[/* handleBreakpoints */ \"b\"])({\n theme\n }, columnSpacing, propValue => {\n const themeSpacing = theme.spacing(propValue);\n\n if (themeSpacing !== '0px') {\n return {\n width: `calc(100% + ${getOffset(themeSpacing)})`,\n marginLeft: `-${getOffset(themeSpacing)}`,\n [`& > .${_gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].item}`]: {\n paddingLeft: getOffset(themeSpacing)\n }\n };\n }\n\n return {};\n });\n }\n\n return styles;\n} // Default CSS values\n// flex: '0 1 auto',\n// flexDirection: 'row',\n// alignItems: 'flex-start',\n// flexWrap: 'nowrap',\n// justifyContent: 'flex-start',\n\nconst GridRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiGrid',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = props.ownerState;\n return [styles.root, container && styles.container, item && styles.item, zeroMinWidth && styles.zeroMinWidth, container && spacing !== 0 && styles[`spacing-xs-${String(spacing)}`], direction !== 'row' && styles[`direction-xs-${String(direction)}`], wrap !== 'wrap' && styles[`wrap-xs-${String(wrap)}`], xs !== false && styles[`grid-xs-${String(xs)}`], sm !== false && styles[`grid-sm-${String(sm)}`], md !== false && styles[`grid-md-${String(md)}`], lg !== false && styles[`grid-lg-${String(lg)}`], xl !== false && styles[`grid-xl-${String(xl)}`]];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n boxSizing: 'border-box'\n}, ownerState.container && {\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%'\n}, ownerState.item && {\n margin: 0 // For instance, it's useful when used with a `figure` element.\n\n}, ownerState.zeroMinWidth && {\n minWidth: 0\n}, ownerState.wrap === 'nowrap' && {\n flexWrap: 'nowrap'\n}, ownerState.wrap === 'reverse' && {\n flexWrap: 'wrap-reverse'\n}), generateDirection, generateRowGap, generateColumnGap, ({\n theme,\n ownerState\n}) => theme.breakpoints.keys.reduce((globalStyles, breakpoint) => {\n // Use side effect over immutability for better performance.\n generateGrid(globalStyles, theme, breakpoint, ownerState);\n return globalStyles;\n}, {}));\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n spacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n } = ownerState;\n const slots = {\n root: ['root', container && 'container', item && 'item', zeroMinWidth && 'zeroMinWidth', container && spacing !== 0 && `spacing-xs-${String(spacing)}`, direction !== 'row' && `direction-xs-${String(direction)}`, wrap !== 'wrap' && `wrap-xs-${String(wrap)}`, xs !== false && `grid-xs-${String(xs)}`, sm !== false && `grid-sm-${String(sm)}`, md !== false && `grid-md-${String(md)}`, lg !== false && `grid-lg-${String(lg)}`, xl !== false && `grid-xl-${String(xl)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(slots, _gridClasses__WEBPACK_IMPORTED_MODULE_12__[/* getGridUtilityClass */ \"b\"], classes);\n};\n\nconst Grid = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Grid(inProps, ref) {\n const themeProps = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiGrid'\n });\n const props = Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(themeProps);\n\n const {\n className,\n columns: columnsProp = 12,\n columnSpacing: columnSpacingProp,\n component = 'div',\n container = false,\n direction = 'row',\n item = false,\n lg = false,\n md = false,\n rowSpacing: rowSpacingProp,\n sm = false,\n spacing = 0,\n wrap = 'wrap',\n xl = false,\n xs = false,\n zeroMinWidth = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const rowSpacing = rowSpacingProp || spacing;\n const columnSpacing = columnSpacingProp || spacing;\n const columns = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"]) || columnsProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n columns,\n container,\n direction,\n item,\n lg,\n md,\n sm,\n rowSpacing,\n columnSpacing,\n wrap,\n xl,\n xs,\n zeroMinWidth\n });\n\n const classes = useUtilityClasses(ownerState);\n\n const wrapChild = element => columns !== 12 ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(_GridContext__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"].Provider, {\n value: columns,\n children: element\n }) : element;\n\n return wrapChild( /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(GridRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ownerState: ownerState,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n as: component,\n ref: ref\n }, other)));\n});\n true ? Grid.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of columns.\n * @default 12\n */\n columns: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * Defines the horizontal space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n columnSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the component will have the flex *container* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n container: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the `flex-direction` style property.\n * It is applied for all screen sizes.\n * @default 'row'\n */\n direction: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row']), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['column-reverse', 'column', 'row-reverse', 'row'])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object]),\n\n /**\n * If `true`, the component will have the flex *item* behavior.\n * You should be wrapping *items* with a *container*.\n * @default false\n */\n item: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `lg` breakpoint and wider screens if not overridden.\n * @default false\n */\n lg: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `md` breakpoint and wider screens if not overridden.\n * @default false\n */\n md: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the vertical space between the type `item` components.\n * It overrides the value of the `spacing` prop.\n */\n rowSpacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `sm` breakpoint and wider screens if not overridden.\n * @default false\n */\n sm: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the space between the type `item` components.\n * It can only be used on a type `container` component.\n * @default 0\n */\n spacing: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string])), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object, prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string]),\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Defines the `flex-wrap` style property.\n * It's applied for all screen sizes.\n * @default 'wrap'\n */\n wrap: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['nowrap', 'wrap-reverse', 'wrap']),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for the `xl` breakpoint and wider screens.\n * @default false\n */\n xl: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * Defines the number of grids the component is going to use.\n * It's applied for all the screen sizes with the lowest priority.\n * @default false\n */\n xs: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['auto', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]), prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool]),\n\n /**\n * If `true`, it sets `min-width: 0` on the item.\n * Refer to the limitations section of the documentation to better understand the use case.\n * @default false\n */\n zeroMinWidth: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool\n} : undefined;\n\nif (true) {\n const requireProp = Object(_utils_requirePropFactory__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('Grid', Grid); // eslint-disable-next-line no-useless-concat\n\n Grid['propTypes' + ''] = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, Grid.propTypes, {\n direction: requireProp('container'),\n lg: requireProp('item'),\n md: requireProp('item'),\n sm: requireProp('item'),\n spacing: requireProp('container'),\n wrap: requireProp('container'),\n xs: requireProp('item'),\n zeroMinWidth: requireProp('item')\n });\n}\n\n/* harmony default export */ __webpack_exports__[\"a\"] = (Grid);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Grid/Grid.js?"); /***/ }), /* 74 */, @@ -370,7 +370,7 @@ eval("/*\r\n *\r\n * decimal.js v7.2.3\r\n * An arbitrary-precision Decimal ty /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return isHTMLElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return isShadowRoot; });\n/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ 115);\n\n\nfunction isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return isElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return isHTMLElement; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return isShadowRoot; });\n/* harmony import */ var _getWindow_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./getWindow.js */ 116);\n\n\nfunction isElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = Object(_getWindow_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\n\n\n//# sourceURL=webpack:///./node_modules/@popperjs/core/lib/dom-utils/instanceOf.js?"); /***/ }), /* 79 */, @@ -392,7 +392,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ 26);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./listItemTextClasses */ 363);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"children\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n inset,\n primary,\n secondary,\n dense\n } = ownerState;\n const slots = {\n root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],\n primary: ['primary'],\n secondary: ['secondary']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* getListItemTextUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemTextRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiListItemText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].primary}`]: styles.primary\n }, {\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].secondary}`]: styles.secondary\n }, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n}, ownerState.primary && ownerState.secondary && {\n marginTop: 6,\n marginBottom: 6\n}, ownerState.inset && {\n paddingLeft: 56\n}));\nconst ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemText(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemText'\n });\n\n const {\n children,\n className,\n disableTypography = false,\n inset = false,\n primary: primaryProp,\n primaryTypographyProps,\n secondary: secondaryProp,\n secondaryTypographyProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const {\n dense\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n let primary = primaryProp != null ? primaryProp : children;\n let secondary = secondaryProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n disableTypography,\n inset,\n primary: !!primary,\n secondary: !!secondary,\n dense\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n primary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps, {\n children: primary\n }));\n }\n\n if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n secondary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: \"body2\",\n className: classes.secondary,\n color: \"text.secondary\",\n display: \"block\"\n }, secondaryTypographyProps, {\n children: secondary\n }));\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsxs\"])(ListItemTextRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [primary, secondary]\n }));\n});\n true ? ListItemText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n * @default false\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the children are indented.\n * This should be used if there is no left avatar or left icon.\n * @default false\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The main content element.\n */\n primary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The secondary content element.\n */\n secondary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemText);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemText/ListItemText.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _Typography__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../Typography */ 25);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../List/ListContext */ 130);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./listItemTextClasses */ 365);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"children\", \"className\", \"disableTypography\", \"inset\", \"primary\", \"primaryTypographyProps\", \"secondary\", \"secondaryTypographyProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n inset,\n primary,\n secondary,\n dense\n } = ownerState;\n const slots = {\n root: ['root', inset && 'inset', dense && 'dense', primary && secondary && 'multiline'],\n primary: ['primary'],\n secondary: ['secondary']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* getListItemTextUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemTextRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('div', {\n name: 'MuiListItemText',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [{\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].primary}`]: styles.primary\n }, {\n [`& .${_listItemTextClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].secondary}`]: styles.secondary\n }, styles.root, ownerState.inset && styles.inset, ownerState.primary && ownerState.secondary && styles.multiline, ownerState.dense && styles.dense];\n }\n})(({\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n flex: '1 1 auto',\n minWidth: 0,\n marginTop: 4,\n marginBottom: 4\n}, ownerState.primary && ownerState.secondary && {\n marginTop: 6,\n marginBottom: 6\n}, ownerState.inset && {\n paddingLeft: 56\n}));\nconst ListItemText = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemText(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemText'\n });\n\n const {\n children,\n className,\n disableTypography = false,\n inset = false,\n primary: primaryProp,\n primaryTypographyProps,\n secondary: secondaryProp,\n secondaryTypographyProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const {\n dense\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n let primary = primaryProp != null ? primaryProp : children;\n let secondary = secondaryProp;\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n disableTypography,\n inset,\n primary: !!primary,\n secondary: !!secondary,\n dense\n });\n\n const classes = useUtilityClasses(ownerState);\n\n if (primary != null && primary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n primary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: dense ? 'body2' : 'body1',\n className: classes.primary,\n component: \"span\",\n display: \"block\"\n }, primaryTypographyProps, {\n children: primary\n }));\n }\n\n if (secondary != null && secondary.type !== _Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"] && !disableTypography) {\n secondary = /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(_Typography__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"], Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n variant: \"body2\",\n className: classes.secondary,\n color: \"text.secondary\",\n display: \"block\"\n }, secondaryTypographyProps, {\n children: secondary\n }));\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsxs\"])(ListItemTextRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other, {\n children: [primary, secondary]\n }));\n});\n true ? ListItemText.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Alias for the `primary` prop.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * If `true`, the children won't be wrapped by a Typography component.\n * This can be useful to render an alternative Typography variant by wrapping\n * the `children` (or `primary`) text, and optional `secondary` text\n * with the Typography component.\n * @default false\n */\n disableTypography: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the children are indented.\n * This should be used if there is no left avatar or left icon.\n * @default false\n */\n inset: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The main content element.\n */\n primary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the primary typography component\n * (as long as disableTypography is not `true`).\n */\n primaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The secondary content element.\n */\n secondary: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * These props will be forwarded to the secondary typography component\n * (as long as disableTypography is not `true`).\n */\n secondaryTypographyProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemText);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemText/ListItemText.js?"); /***/ }), /* 90 */ @@ -404,7 +404,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 282);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tableRowClasses */ 486);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"className\", \"component\", \"hover\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n selected,\n hover,\n head,\n footer\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', hover && 'hover', head && 'head', footer && 'footer']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTableRowUtilityClass */ \"b\"], classes);\n};\n\nconst TableRowRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('tr', {\n name: 'MuiTableRow',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.head && styles.head, ownerState.footer && styles.footer];\n }\n})(({\n theme\n}) => ({\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].hover}:hover`]: {\n backgroundColor: theme.palette.action.hover\n },\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)\n }\n }\n}));\nconst defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nconst TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableRow(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableRow'\n });\n\n const {\n className,\n component = defaultComponent,\n hover = false,\n selected = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(props, _excluded);\n\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, props, {\n component,\n hover,\n selected,\n head: tablelvl2 && tablelvl2.variant === 'head',\n footer: tablelvl2 && tablelvl2.variant === 'footer'\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TableRowRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n role: component === defaultComponent ? null : 'row',\n ownerState: ownerState\n }, other));\n});\n true ? TableRow.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Should be valid children such as `TableCell`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n * @default false\n */\n hover: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n * @default false\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableRow);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableRow/TableRow.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../Table/Tablelvl2Context */ 283);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./tableRowClasses */ 486);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__);\n\n\nconst _excluded = [\"className\", \"component\", \"hover\", \"selected\"];\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n selected,\n hover,\n head,\n footer\n } = ownerState;\n const slots = {\n root: ['root', selected && 'selected', hover && 'hover', head && 'head', footer && 'footer']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* getTableRowUtilityClass */ \"b\"], classes);\n};\n\nconst TableRowRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])('tr', {\n name: 'MuiTableRow',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.head && styles.head, ownerState.footer && styles.footer];\n }\n})(({\n theme\n}) => ({\n color: 'inherit',\n display: 'table-row',\n verticalAlign: 'middle',\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].hover}:hover`]: {\n backgroundColor: theme.palette.action.hover\n },\n [`&.${_tableRowClasses__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity)\n }\n }\n}));\nconst defaultComponent = 'tr';\n/**\n * Will automatically set dynamic row height\n * based on the material table element parent (head, body, etc).\n */\n\nconst TableRow = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function TableRow(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTableRow'\n });\n\n const {\n className,\n component = defaultComponent,\n hover = false,\n selected = false\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(props, _excluded);\n\n const tablelvl2 = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_Table_Tablelvl2Context__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({}, props, {\n component,\n hover,\n selected,\n head: tablelvl2 && tablelvl2.variant === 'head',\n footer: tablelvl2 && tablelvl2.variant === 'footer'\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_11__[\"jsx\"])(TableRowRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])({\n as: component,\n ref: ref,\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n role: component === defaultComponent ? null : 'row',\n ownerState: ownerState\n }, other));\n});\n true ? TableRow.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * Should be valid children such as `TableCell`.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, the table row will shade on hover.\n * @default false\n */\n hover: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the table row will have the selected shading.\n * @default false\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (TableRow);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/TableRow/TableRow.js?"); /***/ }), /* 91 */, @@ -420,7 +420,7 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPOR /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGWrapper = void 0;\nvar Wrapper_js_1 = __webpack_require__(/*! ../common/Wrapper.js */ 1164);\nvar svg_js_1 = __webpack_require__(/*! ../svg.js */ 519);\nvar SVGWrapper = (function (_super) {\n __extends(SVGWrapper, _super);\n function SVGWrapper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = null;\n return _this;\n }\n SVGWrapper.prototype.toSVG = function (parent) {\n this.addChildren(this.standardSVGnode(parent));\n };\n SVGWrapper.prototype.addChildren = function (parent) {\n var e_1, _a;\n var x = 0;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.toSVG(parent);\n if (child.element) {\n child.place(x + child.bbox.L * child.bbox.rscale, 0);\n }\n x += (child.bbox.L + child.bbox.w + child.bbox.R) * child.bbox.rscale;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n SVGWrapper.prototype.standardSVGnode = function (parent) {\n var svg = this.createSVGnode(parent);\n this.handleStyles();\n this.handleScale();\n this.handleColor();\n this.handleAttributes();\n return svg;\n };\n SVGWrapper.prototype.createSVGnode = function (parent) {\n this.element = this.svg('g', { 'data-mml-node': this.node.kind });\n var href = this.node.attributes.get('href');\n if (href) {\n parent = this.adaptor.append(parent, this.svg('a', { href: href }));\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n this.adaptor.append(this.element, this.svg('rect', {\n 'data-hitbox': true, fill: 'none', stroke: 'none', 'pointer-events': 'all',\n width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)\n }));\n }\n this.adaptor.append(parent, this.element);\n return this.element;\n };\n SVGWrapper.prototype.handleStyles = function () {\n if (!this.styles)\n return;\n var styles = this.styles.cssText;\n if (styles) {\n this.adaptor.setAttribute(this.element, 'style', styles);\n }\n };\n SVGWrapper.prototype.handleScale = function () {\n if (this.bbox.rscale !== 1) {\n var scale = 'scale(' + this.fixed(this.bbox.rscale / 1000, 3) + ')';\n this.adaptor.setAttribute(this.element, 'transform', scale);\n }\n };\n SVGWrapper.prototype.handleColor = function () {\n var adaptor = this.adaptor;\n var attributes = this.node.attributes;\n var mathcolor = attributes.getExplicit('mathcolor');\n var color = attributes.getExplicit('color');\n var mathbackground = attributes.getExplicit('mathbackground');\n var background = attributes.getExplicit('background');\n if (mathcolor || color) {\n adaptor.setAttribute(this.element, 'fill', mathcolor || color);\n adaptor.setAttribute(this.element, 'stroke', mathcolor || color);\n }\n if (mathbackground || background) {\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n var rect = this.svg('rect', {\n fill: mathbackground || background,\n x: 0, y: this.fixed(-d),\n width: this.fixed(w),\n height: this.fixed(h + d),\n 'data-bgcolor': true\n });\n var child = adaptor.firstChild(this.element);\n if (child) {\n adaptor.insert(rect, child);\n }\n else {\n adaptor.append(this.element, rect);\n }\n }\n };\n SVGWrapper.prototype.handleAttributes = function () {\n var e_2, _a, e_3, _b;\n var attributes = this.node.attributes;\n var defaults = attributes.getAllDefaults();\n var skip = SVGWrapper.skipAttributes;\n try {\n for (var _c = __values(attributes.getExplicitNames()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (skip[name_1] === false || (!(name_1 in defaults) && !skip[name_1] &&\n !this.adaptor.hasAttribute(this.element, name_1))) {\n this.adaptor.setAttribute(this.element, name_1, attributes.getExplicit(name_1));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (attributes.get('class')) {\n var names = attributes.get('class').trim().split(/ +/);\n try {\n for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {\n var name_2 = names_1_1.value;\n this.adaptor.addClass(this.element, name_2);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (names_1_1 && !names_1_1.done && (_b = names_1.return)) _b.call(names_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n };\n SVGWrapper.prototype.place = function (x, y, element) {\n if (element === void 0) { element = null; }\n if (!(x || y))\n return;\n if (!element) {\n element = this.element;\n y = this.handleId(y);\n }\n var translate = \"translate(\" + this.fixed(x) + \",\" + this.fixed(y) + \")\";\n var transform = this.adaptor.getAttribute(element, 'transform') || '';\n this.adaptor.setAttribute(element, 'transform', translate + (transform ? ' ' + transform : ''));\n };\n SVGWrapper.prototype.handleId = function (y) {\n if (!this.node.attributes || !this.node.attributes.get('id')) {\n return y;\n }\n var adaptor = this.adaptor;\n var h = this.getBBox().h;\n var children = adaptor.childNodes(this.element);\n children.forEach(function (child) { return adaptor.remove(child); });\n var g = this.svg('g', { 'data-idbox': true, transform: \"translate(0,\" + this.fixed(-h) + \")\" }, children);\n adaptor.append(this.element, this.svg('text', { 'data-id-align': true }, [this.text('')]));\n adaptor.append(this.element, g);\n return y + h;\n };\n SVGWrapper.prototype.firstChild = function () {\n var adaptor = this.adaptor;\n var child = adaptor.firstChild(this.element);\n if (child && adaptor.kind(child) === 'text' && adaptor.getAttribute(child, 'data-id-align')) {\n child = adaptor.firstChild(adaptor.next(child));\n }\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-hitbox')) {\n child = adaptor.next(child);\n }\n return child;\n };\n SVGWrapper.prototype.placeChar = function (n, x, y, parent, variant) {\n var e_4, _a;\n if (variant === void 0) { variant = null; }\n if (variant === null) {\n variant = this.variant;\n }\n var C = n.toString(16).toUpperCase();\n var _b = __read(this.getVariantChar(variant, n), 4), w = _b[2], data = _b[3];\n if ('p' in data) {\n var path = (data.p ? 'M' + data.p + 'Z' : '');\n this.place(x, y, this.adaptor.append(parent, this.charNode(variant, C, path)));\n }\n else if ('c' in data) {\n var g = this.adaptor.append(parent, this.svg('g', { 'data-c': C }));\n this.place(x, y, g);\n x = 0;\n try {\n for (var _c = __values(this.unicodeChars(data.c, variant)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var n_1 = _d.value;\n x += this.placeChar(n_1, x, y, g, variant);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n else if (data.unknown) {\n var char = String.fromCodePoint(n);\n var text = this.adaptor.append(parent, this.jax.unknownText(char, variant));\n this.place(x, y, text);\n return this.jax.measureTextNodeWithCache(text, char, variant).w;\n }\n return w;\n };\n SVGWrapper.prototype.charNode = function (variant, C, path) {\n var cache = this.jax.options.fontCache;\n return (cache !== 'none' ? this.useNode(variant, C, path) : this.pathNode(C, path));\n };\n SVGWrapper.prototype.pathNode = function (C, path) {\n return this.svg('path', { 'data-c': C, d: path });\n };\n SVGWrapper.prototype.useNode = function (variant, C, path) {\n var use = this.svg('use', { 'data-c': C });\n var id = '#' + this.jax.fontCache.cachePath(variant, C, path);\n this.adaptor.setAttribute(use, 'href', id, svg_js_1.XLINKNS);\n return use;\n };\n SVGWrapper.prototype.drawBBox = function () {\n var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;\n var box = this.svg('g', { style: {\n opacity: .25\n } }, [\n this.svg('rect', {\n fill: 'red',\n height: this.fixed(h),\n width: this.fixed(w)\n }),\n this.svg('rect', {\n fill: 'green',\n height: this.fixed(d),\n width: this.fixed(w),\n y: this.fixed(-d)\n })\n ]);\n var node = this.element || this.parent.element;\n this.adaptor.append(node, box);\n };\n SVGWrapper.prototype.html = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.html(type, def, content);\n };\n SVGWrapper.prototype.svg = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.svg(type, def, content);\n };\n SVGWrapper.prototype.text = function (text) {\n return this.jax.text(text);\n };\n SVGWrapper.prototype.fixed = function (x, n) {\n if (n === void 0) { n = 1; }\n return this.jax.fixed(x * 1000, n);\n };\n SVGWrapper.kind = 'unknown';\n return SVGWrapper;\n}(Wrapper_js_1.CommonWrapper));\nexports.SVGWrapper = SVGWrapper;\n//# sourceMappingURL=Wrapper.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/Wrapper.js?"); +eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nvar __read = (this && this.__read) || function (o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SVGWrapper = void 0;\nvar Wrapper_js_1 = __webpack_require__(/*! ../common/Wrapper.js */ 1167);\nvar svg_js_1 = __webpack_require__(/*! ../svg.js */ 519);\nvar SVGWrapper = (function (_super) {\n __extends(SVGWrapper, _super);\n function SVGWrapper() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.element = null;\n return _this;\n }\n SVGWrapper.prototype.toSVG = function (parent) {\n this.addChildren(this.standardSVGnode(parent));\n };\n SVGWrapper.prototype.addChildren = function (parent) {\n var e_1, _a;\n var x = 0;\n try {\n for (var _b = __values(this.childNodes), _c = _b.next(); !_c.done; _c = _b.next()) {\n var child = _c.value;\n child.toSVG(parent);\n if (child.element) {\n child.place(x + child.bbox.L * child.bbox.rscale, 0);\n }\n x += (child.bbox.L + child.bbox.w + child.bbox.R) * child.bbox.rscale;\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n };\n SVGWrapper.prototype.standardSVGnode = function (parent) {\n var svg = this.createSVGnode(parent);\n this.handleStyles();\n this.handleScale();\n this.handleColor();\n this.handleAttributes();\n return svg;\n };\n SVGWrapper.prototype.createSVGnode = function (parent) {\n this.element = this.svg('g', { 'data-mml-node': this.node.kind });\n var href = this.node.attributes.get('href');\n if (href) {\n parent = this.adaptor.append(parent, this.svg('a', { href: href }));\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n this.adaptor.append(this.element, this.svg('rect', {\n 'data-hitbox': true, fill: 'none', stroke: 'none', 'pointer-events': 'all',\n width: this.fixed(w), height: this.fixed(h + d), y: this.fixed(-d)\n }));\n }\n this.adaptor.append(parent, this.element);\n return this.element;\n };\n SVGWrapper.prototype.handleStyles = function () {\n if (!this.styles)\n return;\n var styles = this.styles.cssText;\n if (styles) {\n this.adaptor.setAttribute(this.element, 'style', styles);\n }\n };\n SVGWrapper.prototype.handleScale = function () {\n if (this.bbox.rscale !== 1) {\n var scale = 'scale(' + this.fixed(this.bbox.rscale / 1000, 3) + ')';\n this.adaptor.setAttribute(this.element, 'transform', scale);\n }\n };\n SVGWrapper.prototype.handleColor = function () {\n var adaptor = this.adaptor;\n var attributes = this.node.attributes;\n var mathcolor = attributes.getExplicit('mathcolor');\n var color = attributes.getExplicit('color');\n var mathbackground = attributes.getExplicit('mathbackground');\n var background = attributes.getExplicit('background');\n if (mathcolor || color) {\n adaptor.setAttribute(this.element, 'fill', mathcolor || color);\n adaptor.setAttribute(this.element, 'stroke', mathcolor || color);\n }\n if (mathbackground || background) {\n var _a = this.getBBox(), h = _a.h, d = _a.d, w = _a.w;\n var rect = this.svg('rect', {\n fill: mathbackground || background,\n x: 0, y: this.fixed(-d),\n width: this.fixed(w),\n height: this.fixed(h + d),\n 'data-bgcolor': true\n });\n var child = adaptor.firstChild(this.element);\n if (child) {\n adaptor.insert(rect, child);\n }\n else {\n adaptor.append(this.element, rect);\n }\n }\n };\n SVGWrapper.prototype.handleAttributes = function () {\n var e_2, _a, e_3, _b;\n var attributes = this.node.attributes;\n var defaults = attributes.getAllDefaults();\n var skip = SVGWrapper.skipAttributes;\n try {\n for (var _c = __values(attributes.getExplicitNames()), _d = _c.next(); !_d.done; _d = _c.next()) {\n var name_1 = _d.value;\n if (skip[name_1] === false || (!(name_1 in defaults) && !skip[name_1] &&\n !this.adaptor.hasAttribute(this.element, name_1))) {\n this.adaptor.setAttribute(this.element, name_1, attributes.getExplicit(name_1));\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_2) throw e_2.error; }\n }\n if (attributes.get('class')) {\n var names = attributes.get('class').trim().split(/ +/);\n try {\n for (var names_1 = __values(names), names_1_1 = names_1.next(); !names_1_1.done; names_1_1 = names_1.next()) {\n var name_2 = names_1_1.value;\n this.adaptor.addClass(this.element, name_2);\n }\n }\n catch (e_3_1) { e_3 = { error: e_3_1 }; }\n finally {\n try {\n if (names_1_1 && !names_1_1.done && (_b = names_1.return)) _b.call(names_1);\n }\n finally { if (e_3) throw e_3.error; }\n }\n }\n };\n SVGWrapper.prototype.place = function (x, y, element) {\n if (element === void 0) { element = null; }\n if (!(x || y))\n return;\n if (!element) {\n element = this.element;\n y = this.handleId(y);\n }\n var translate = \"translate(\" + this.fixed(x) + \",\" + this.fixed(y) + \")\";\n var transform = this.adaptor.getAttribute(element, 'transform') || '';\n this.adaptor.setAttribute(element, 'transform', translate + (transform ? ' ' + transform : ''));\n };\n SVGWrapper.prototype.handleId = function (y) {\n if (!this.node.attributes || !this.node.attributes.get('id')) {\n return y;\n }\n var adaptor = this.adaptor;\n var h = this.getBBox().h;\n var children = adaptor.childNodes(this.element);\n children.forEach(function (child) { return adaptor.remove(child); });\n var g = this.svg('g', { 'data-idbox': true, transform: \"translate(0,\" + this.fixed(-h) + \")\" }, children);\n adaptor.append(this.element, this.svg('text', { 'data-id-align': true }, [this.text('')]));\n adaptor.append(this.element, g);\n return y + h;\n };\n SVGWrapper.prototype.firstChild = function () {\n var adaptor = this.adaptor;\n var child = adaptor.firstChild(this.element);\n if (child && adaptor.kind(child) === 'text' && adaptor.getAttribute(child, 'data-id-align')) {\n child = adaptor.firstChild(adaptor.next(child));\n }\n if (child && adaptor.kind(child) === 'rect' && adaptor.getAttribute(child, 'data-hitbox')) {\n child = adaptor.next(child);\n }\n return child;\n };\n SVGWrapper.prototype.placeChar = function (n, x, y, parent, variant) {\n var e_4, _a;\n if (variant === void 0) { variant = null; }\n if (variant === null) {\n variant = this.variant;\n }\n var C = n.toString(16).toUpperCase();\n var _b = __read(this.getVariantChar(variant, n), 4), w = _b[2], data = _b[3];\n if ('p' in data) {\n var path = (data.p ? 'M' + data.p + 'Z' : '');\n this.place(x, y, this.adaptor.append(parent, this.charNode(variant, C, path)));\n }\n else if ('c' in data) {\n var g = this.adaptor.append(parent, this.svg('g', { 'data-c': C }));\n this.place(x, y, g);\n x = 0;\n try {\n for (var _c = __values(this.unicodeChars(data.c, variant)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var n_1 = _d.value;\n x += this.placeChar(n_1, x, y, g, variant);\n }\n }\n catch (e_4_1) { e_4 = { error: e_4_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_4) throw e_4.error; }\n }\n }\n else if (data.unknown) {\n var char = String.fromCodePoint(n);\n var text = this.adaptor.append(parent, this.jax.unknownText(char, variant));\n this.place(x, y, text);\n return this.jax.measureTextNodeWithCache(text, char, variant).w;\n }\n return w;\n };\n SVGWrapper.prototype.charNode = function (variant, C, path) {\n var cache = this.jax.options.fontCache;\n return (cache !== 'none' ? this.useNode(variant, C, path) : this.pathNode(C, path));\n };\n SVGWrapper.prototype.pathNode = function (C, path) {\n return this.svg('path', { 'data-c': C, d: path });\n };\n SVGWrapper.prototype.useNode = function (variant, C, path) {\n var use = this.svg('use', { 'data-c': C });\n var id = '#' + this.jax.fontCache.cachePath(variant, C, path);\n this.adaptor.setAttribute(use, 'href', id, svg_js_1.XLINKNS);\n return use;\n };\n SVGWrapper.prototype.drawBBox = function () {\n var _a = this.getBBox(), w = _a.w, h = _a.h, d = _a.d;\n var box = this.svg('g', { style: {\n opacity: .25\n } }, [\n this.svg('rect', {\n fill: 'red',\n height: this.fixed(h),\n width: this.fixed(w)\n }),\n this.svg('rect', {\n fill: 'green',\n height: this.fixed(d),\n width: this.fixed(w),\n y: this.fixed(-d)\n })\n ]);\n var node = this.element || this.parent.element;\n this.adaptor.append(node, box);\n };\n SVGWrapper.prototype.html = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.html(type, def, content);\n };\n SVGWrapper.prototype.svg = function (type, def, content) {\n if (def === void 0) { def = {}; }\n if (content === void 0) { content = []; }\n return this.jax.svg(type, def, content);\n };\n SVGWrapper.prototype.text = function (text) {\n return this.jax.text(text);\n };\n SVGWrapper.prototype.fixed = function (x, n) {\n if (n === void 0) { n = 1; }\n return this.jax.fixed(x * 1000, n);\n };\n SVGWrapper.kind = 'unknown';\n return SVGWrapper;\n}(Wrapper_js_1.CommonWrapper));\nexports.SVGWrapper = SVGWrapper;\n//# sourceMappingURL=Wrapper.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/Wrapper.js?"); /***/ }), /* 96 */ @@ -432,7 +432,7 @@ eval("\nvar __extends = (this && this.__extends) || (function () {\n var exte /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/system */ 313);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ 279);\n\n\n\nfunction useTheme() {\n const theme = Object(_mui_system__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(_defaultTheme__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"]);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__[\"useDebugValue\"](theme);\n }\n\n return theme;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useTheme.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return useTheme; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @mui/system */ 315);\n/* harmony import */ var _defaultTheme__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./defaultTheme */ 280);\n\n\n\nfunction useTheme() {\n const theme = Object(_mui_system__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])(_defaultTheme__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"]);\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n react__WEBPACK_IMPORTED_MODULE_0__[\"useDebugValue\"](theme);\n }\n\n return theme;\n}\n\n//# sourceURL=webpack:///./node_modules/@mui/material/styles/useTheme.js?"); /***/ }), /* 97 */, @@ -459,13 +459,10 @@ eval("/**\n * Determines if a given element is a DOM element name (i.e. not a Re /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listItemIconClasses */ 480);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__);\n\n\nconst _excluded = [\"className\"];\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__[/* getListItemIconUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemIconRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n}, ownerState.alignItems === 'flex-start' && {\n marginTop: 8\n}));\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nconst ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemIcon(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n\n const {\n className\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems: context.alignItems\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__[\"jsx\"])(ListItemIconRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\n true ? ListItemIcon.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemIcon);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemIcon/ListItemIcon.js?"); +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./listItemIconClasses */ 480);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 130);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__);\n\n\nconst _excluded = [\"className\"];\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n alignItems,\n classes\n } = ownerState;\n const slots = {\n root: ['root', alignItems === 'flex-start' && 'alignItemsFlexStart']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _listItemIconClasses__WEBPACK_IMPORTED_MODULE_8__[/* getListItemIconUtilityClass */ \"b\"], classes);\n};\n\nconst ListItemIconRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])('div', {\n name: 'MuiListItemIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.alignItems === 'flex-start' && styles.alignItemsFlexStart];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minWidth: 56,\n color: theme.palette.action.active,\n flexShrink: 0,\n display: 'inline-flex'\n}, ownerState.alignItems === 'flex-start' && {\n marginTop: 8\n}));\n/**\n * A simple wrapper to apply `List` styles to an `Icon` or `SvgIcon`.\n */\n\nconst ListItemIcon = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function ListItemIcon(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiListItemIcon'\n });\n\n const {\n className\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n alignItems: context.alignItems\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_10__[\"jsx\"])(ListItemIconRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n ownerState: ownerState,\n ref: ref\n }, other));\n});\n true ? ListItemIcon.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The content of the component, normally `Icon`, `SvgIcon`,\n * or a `@mui/icons-material` SVG icon element.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (ListItemIcon);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/ListItemIcon/ListItemIcon.js?"); /***/ }), -/* 102 */, -/* 103 */, -/* 104 */, -/* 105 */ +/* 102 */ /*!*******************************************************!*\ !*** ./node_modules/@mui/material/Tooltip/Tooltip.js ***! \*******************************************************/ @@ -474,9 +471,12 @@ eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertie /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export testReset */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 332);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ 1073);\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Popper */ 1074);\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEventCallback */ 315);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useId__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useId */ 307);\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ 338);\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/useControlled */ 236);\n/* harmony import */ var _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tooltipClasses */ 255);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* getTooltipUtilityClass */ \"b\"], classes);\n};\n\nconst TooltipPopper = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.92),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"left\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"right\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"top\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"bottom\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nlet hystersisTimer = null;\nfunction testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\n\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n\n handler(event);\n };\n}\n\nconst Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Tooltip(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTooltip'\n });\n\n const {\n arrow = false,\n children,\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent = _Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n PopperProps = {},\n title,\n TransitionComponent = _Grow__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n TransitionProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"]();\n const [arrowRef, setArrowRef] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](null);\n const ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const enterTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const leaveTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const touchTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const [openState, setOpenState] = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"])({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](openProp !== undefined); // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n const id = Object(_utils_useId__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(idProp);\n const prevUserSelect = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const stopTouchInteraction = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n\n clearTimeout(touchTimer.current);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n return () => {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n stopTouchInteraction();\n };\n }, [stopTouchInteraction]);\n\n const handleOpen = event => {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n\n const handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(() => {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose && open) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(() => {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n });\n\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.current = setTimeout(() => {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n\n const handleLeave = event => {\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveDelay);\n };\n\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(); // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n\n const [, setChildIsFocusVisible] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n\n const handleBlur = event => {\n handleBlurVisible(event);\n\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n handleFocusVisible(event);\n\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n\n const handleTouchStart = event => {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect; // Prevent iOS text selection on long-tap.\n\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.current = setTimeout(() => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n }, enterTouchDelay);\n };\n\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!open) {\n return undefined;\n }\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n\n\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(setChildNode, ref);\n const handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(focusVisibleRef, handleUseRef);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n }\n\n const positionRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n x: 0,\n y: 0\n });\n const popperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n\n const handleMouseMove = event => {\n const childrenProps = children.props;\n\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n\n positionRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n\n const childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, nameOrDescProps, other, children.props, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n\n if (true) {\n childrenProps['data-mui-internal-clone-element'] = true; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['Material-UI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n\n const interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n\n if (true) {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n\n const popperOptions = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](() => {\n var _PopperProps$popperOp;\n\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponent,\n touch: ignoreNonTouchEvents.current\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childrenProps), /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipPopper, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: PopperComponent,\n className: classes.popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: positionRef.current.y,\n left: positionRef.current.x,\n right: positionRef.current.x,\n bottom: positionRef.current.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, PopperProps, {\n popperOptions: popperOptions,\n ownerState: ownerState,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps, {\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(TooltipTooltip, {\n className: classes.tooltip,\n ownerState: ownerState,\n children: [title, arrow ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipArrow, {\n className: classes.arrow,\n ref: setArrowRef,\n ownerState: ownerState\n }) : null]\n })\n }))\n }))]\n });\n});\n true ? Tooltip.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip reference element.\n */\n children: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"].isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n * @default {}\n */\n PopperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Tooltip);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Tooltip/Tooltip.js?"); +eval("/* unused harmony export testReset */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 334);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useTheme__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useTheme */ 96);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _Grow__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../Grow */ 1076);\n/* harmony import */ var _Popper__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Popper */ 1077);\n/* harmony import */ var _utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../utils/useEventCallback */ 317);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _utils_useId__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../utils/useId */ 309);\n/* harmony import */ var _utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../utils/useIsFocusVisible */ 340);\n/* harmony import */ var _utils_useControlled__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../utils/useControlled */ 236);\n/* harmony import */ var _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./tooltipClasses */ 256);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__);\n\n\nconst _excluded = [\"arrow\", \"children\", \"classes\", \"describeChild\", \"disableFocusListener\", \"disableHoverListener\", \"disableInteractive\", \"disableTouchListener\", \"enterDelay\", \"enterNextDelay\", \"enterTouchDelay\", \"followCursor\", \"id\", \"leaveDelay\", \"leaveTouchDelay\", \"onClose\", \"onOpen\", \"open\", \"placement\", \"PopperComponent\", \"PopperProps\", \"title\", \"TransitionComponent\", \"TransitionProps\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableInteractive,\n arrow,\n touch,\n placement\n } = ownerState;\n const slots = {\n popper: ['popper', !disableInteractive && 'popperInteractive', arrow && 'popperArrow'],\n tooltip: ['tooltip', arrow && 'tooltipArrow', touch && 'touch', `tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(placement.split('-')[0])}`],\n arrow: ['arrow']\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* getTooltipUtilityClass */ \"b\"], classes);\n};\n\nconst TooltipPopper = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"], {\n name: 'MuiTooltip',\n slot: 'Popper',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.popper, !ownerState.disableInteractive && styles.popperInteractive, ownerState.arrow && styles.popperArrow, !ownerState.open && styles.popperClose];\n }\n})(({\n theme,\n ownerState,\n open\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n zIndex: theme.zIndex.tooltip,\n pointerEvents: 'none'\n}, !ownerState.disableInteractive && {\n pointerEvents: 'auto'\n}, !open && {\n pointerEvents: 'none'\n}, ownerState.arrow && {\n [`&[data-popper-placement*=\"bottom\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n top: 0,\n marginTop: '-0.71em',\n '&::before': {\n transformOrigin: '0 100%'\n }\n },\n [`&[data-popper-placement*=\"top\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: {\n bottom: 0,\n marginBottom: '-0.71em',\n '&::before': {\n transformOrigin: '100% 0'\n }\n },\n [`&[data-popper-placement*=\"right\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n left: 0,\n marginLeft: '-0.71em'\n } : {\n right: 0,\n marginRight: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '100% 100%'\n }\n }),\n [`&[data-popper-placement*=\"left\"] .${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].arrow}`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, !ownerState.isRtl ? {\n right: 0,\n marginRight: '-0.71em'\n } : {\n left: 0,\n marginLeft: '-0.71em'\n }, {\n height: '1em',\n width: '0.71em',\n '&::before': {\n transformOrigin: '0 0'\n }\n })\n}));\nconst TooltipTooltip = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('div', {\n name: 'MuiTooltip',\n slot: 'Tooltip',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.tooltip, ownerState.touch && styles.touch, ownerState.arrow && styles.tooltipArrow, styles[`tooltipPlacement${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.placement.split('-')[0])}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.92),\n borderRadius: theme.shape.borderRadius,\n color: theme.palette.common.white,\n fontFamily: theme.typography.fontFamily,\n padding: '4px 8px',\n fontSize: theme.typography.pxToRem(11),\n maxWidth: 300,\n margin: 2,\n wordWrap: 'break-word',\n fontWeight: theme.typography.fontWeightMedium\n}, ownerState.arrow && {\n position: 'relative',\n margin: 0\n}, ownerState.touch && {\n padding: '8px 16px',\n fontSize: theme.typography.pxToRem(14),\n lineHeight: `${round(16 / 14)}em`,\n fontWeight: theme.typography.fontWeightRegular\n}, {\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"left\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'right center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"right\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'left center'\n }, !ownerState.isRtl ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginLeft: '14px'\n }, ownerState.touch && {\n marginLeft: '24px'\n }) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n marginRight: '14px'\n }, ownerState.touch && {\n marginRight: '24px'\n })),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"top\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center bottom',\n marginBottom: '14px'\n }, ownerState.touch && {\n marginBottom: '24px'\n }),\n [`.${_tooltipClasses__WEBPACK_IMPORTED_MODULE_19__[/* default */ \"a\"].popper}[data-popper-placement*=\"bottom\"] &`]: Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n transformOrigin: 'center top',\n marginTop: '14px'\n }, ownerState.touch && {\n marginTop: '24px'\n })\n}));\nconst TooltipArrow = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])('span', {\n name: 'MuiTooltip',\n slot: 'Arrow',\n overridesResolver: (props, styles) => styles.arrow\n})(({\n theme\n}) => ({\n overflow: 'hidden',\n position: 'absolute',\n width: '1em',\n height: '0.71em'\n /* = width / sqrt(2) = (length of the hypotenuse) */\n ,\n boxSizing: 'border-box',\n color: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.grey[700], 0.9),\n '&::before': {\n content: '\"\"',\n margin: 'auto',\n display: 'block',\n width: '100%',\n height: '100%',\n backgroundColor: 'currentColor',\n transform: 'rotate(45deg)'\n }\n}));\nlet hystersisOpen = false;\nlet hystersisTimer = null;\nfunction testReset() {\n hystersisOpen = false;\n clearTimeout(hystersisTimer);\n}\n\nfunction composeEventHandler(handler, eventHandler) {\n return event => {\n if (eventHandler) {\n eventHandler(event);\n }\n\n handler(event);\n };\n}\n\nconst Tooltip = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function Tooltip(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiTooltip'\n });\n\n const {\n arrow = false,\n children,\n describeChild = false,\n disableFocusListener = false,\n disableHoverListener = false,\n disableInteractive: disableInteractiveProp = false,\n disableTouchListener = false,\n enterDelay = 100,\n enterNextDelay = 0,\n enterTouchDelay = 700,\n followCursor = false,\n id: idProp,\n leaveDelay = 0,\n leaveTouchDelay = 1500,\n onClose,\n onOpen,\n open: openProp,\n placement = 'bottom',\n PopperComponent = _Popper__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"],\n PopperProps = {},\n title,\n TransitionComponent = _Grow__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"],\n TransitionProps\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const theme = Object(_styles_useTheme__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])();\n const isRtl = theme.direction === 'rtl';\n const [childNode, setChildNode] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"]();\n const [arrowRef, setArrowRef] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](null);\n const ignoreNonTouchEvents = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](false);\n const disableInteractive = disableInteractiveProp || followCursor;\n const closeTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const enterTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const leaveTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const touchTimer = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const [openState, setOpenState] = Object(_utils_useControlled__WEBPACK_IMPORTED_MODULE_18__[/* default */ \"a\"])({\n controlled: openProp,\n default: false,\n name: 'Tooltip',\n state: 'open'\n });\n let open = openState;\n\n if (true) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n const {\n current: isControlled\n } = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](openProp !== undefined); // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && childNode.disabled && !isControlled && title !== '' && childNode.tagName.toLowerCase() === 'button') {\n console.error(['Material-UI: You are providing a disabled `button` child to the Tooltip component.', 'A disabled element does not fire events.', \"Tooltip needs to listen to the child element's events to display the title.\", '', 'Add a simple wrapper element, such as a `span`.'].join('\\n'));\n }\n }, [title, childNode, isControlled]);\n }\n\n const id = Object(_utils_useId__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"])(idProp);\n const prevUserSelect = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n const stopTouchInteraction = react__WEBPACK_IMPORTED_MODULE_2__[\"useCallback\"](() => {\n if (prevUserSelect.current !== undefined) {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n prevUserSelect.current = undefined;\n }\n\n clearTimeout(touchTimer.current);\n }, []);\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n return () => {\n clearTimeout(closeTimer.current);\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n stopTouchInteraction();\n };\n }, [stopTouchInteraction]);\n\n const handleOpen = event => {\n clearTimeout(hystersisTimer);\n hystersisOpen = true; // The mouseover event will trigger for every nested element in the tooltip.\n // We can skip rerendering when the tooltip is already open.\n // We are using the mouseover event instead of the mouseenter event to fix a hide/show issue.\n\n setOpenState(true);\n\n if (onOpen && !open) {\n onOpen(event);\n }\n };\n\n const handleClose = Object(_utils_useEventCallback__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"])(\n /**\n * @param {React.SyntheticEvent | Event} event\n */\n event => {\n clearTimeout(hystersisTimer);\n hystersisTimer = setTimeout(() => {\n hystersisOpen = false;\n }, 800 + leaveDelay);\n setOpenState(false);\n\n if (onClose && open) {\n onClose(event);\n }\n\n clearTimeout(closeTimer.current);\n closeTimer.current = setTimeout(() => {\n ignoreNonTouchEvents.current = false;\n }, theme.transitions.duration.shortest);\n });\n\n const handleEnter = event => {\n if (ignoreNonTouchEvents.current && event.type !== 'touchstart') {\n return;\n } // Remove the title ahead of time.\n // We don't want to wait for the next render commit.\n // We would risk displaying two tooltips at the same time (native + this one).\n\n\n if (childNode) {\n childNode.removeAttribute('title');\n }\n\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n\n if (enterDelay || hystersisOpen && enterNextDelay) {\n enterTimer.current = setTimeout(() => {\n handleOpen(event);\n }, hystersisOpen ? enterNextDelay : enterDelay);\n } else {\n handleOpen(event);\n }\n };\n\n const handleLeave = event => {\n clearTimeout(enterTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveDelay);\n };\n\n const {\n isFocusVisibleRef,\n onBlur: handleBlurVisible,\n onFocus: handleFocusVisible,\n ref: focusVisibleRef\n } = Object(_utils_useIsFocusVisible__WEBPACK_IMPORTED_MODULE_17__[/* default */ \"a\"])(); // We don't necessarily care about the focusVisible state (which is safe to access via ref anyway).\n // We just need to re-render the Tooltip if the focus-visible state changes.\n\n const [, setChildIsFocusVisible] = react__WEBPACK_IMPORTED_MODULE_2__[\"useState\"](false);\n\n const handleBlur = event => {\n handleBlurVisible(event);\n\n if (isFocusVisibleRef.current === false) {\n setChildIsFocusVisible(false);\n handleLeave(event);\n }\n };\n\n const handleFocus = event => {\n // Workaround for https://github.com/facebook/react/issues/7769\n // The autoFocus of React might trigger the event before the componentDidMount.\n // We need to account for this eventuality.\n if (!childNode) {\n setChildNode(event.currentTarget);\n }\n\n handleFocusVisible(event);\n\n if (isFocusVisibleRef.current === true) {\n setChildIsFocusVisible(true);\n handleEnter(event);\n }\n };\n\n const detectTouchStart = event => {\n ignoreNonTouchEvents.current = true;\n const childrenProps = children.props;\n\n if (childrenProps.onTouchStart) {\n childrenProps.onTouchStart(event);\n }\n };\n\n const handleMouseOver = handleEnter;\n const handleMouseLeave = handleLeave;\n\n const handleTouchStart = event => {\n detectTouchStart(event);\n clearTimeout(leaveTimer.current);\n clearTimeout(closeTimer.current);\n stopTouchInteraction();\n prevUserSelect.current = document.body.style.WebkitUserSelect; // Prevent iOS text selection on long-tap.\n\n document.body.style.WebkitUserSelect = 'none';\n touchTimer.current = setTimeout(() => {\n document.body.style.WebkitUserSelect = prevUserSelect.current;\n handleEnter(event);\n }, enterTouchDelay);\n };\n\n const handleTouchEnd = event => {\n if (children.props.onTouchEnd) {\n children.props.onTouchEnd(event);\n }\n\n clearTimeout(touchTimer.current);\n clearTimeout(leaveTimer.current);\n leaveTimer.current = setTimeout(() => {\n handleClose(event);\n }, leaveTouchDelay);\n };\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (!open) {\n return undefined;\n }\n /**\n * @param {KeyboardEvent} nativeEvent\n */\n\n\n function handleKeyDown(nativeEvent) {\n // IE11, Edge (prior to using Bink?) use 'Esc'\n if (nativeEvent.key === 'Escape' || nativeEvent.key === 'Esc') {\n handleClose(nativeEvent);\n }\n }\n\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [handleClose, open]);\n const handleUseRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(setChildNode, ref);\n const handleFocusRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(focusVisibleRef, handleUseRef);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"])(children.ref, handleFocusRef); // There is no point in displaying an empty tooltip.\n\n if (title === '') {\n open = false;\n }\n\n const positionRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]({\n x: 0,\n y: 0\n });\n const popperRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"]();\n\n const handleMouseMove = event => {\n const childrenProps = children.props;\n\n if (childrenProps.onMouseMove) {\n childrenProps.onMouseMove(event);\n }\n\n positionRef.current = {\n x: event.clientX,\n y: event.clientY\n };\n\n if (popperRef.current) {\n popperRef.current.update();\n }\n };\n\n const nameOrDescProps = {};\n const titleIsString = typeof title === 'string';\n\n if (describeChild) {\n nameOrDescProps.title = !open && titleIsString && !disableHoverListener ? title : null;\n nameOrDescProps['aria-describedby'] = open ? id : null;\n } else {\n nameOrDescProps['aria-label'] = titleIsString ? title : null;\n nameOrDescProps['aria-labelledby'] = open && !titleIsString ? id : null;\n }\n\n const childrenProps = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, nameOrDescProps, other, children.props, {\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(other.className, children.props.className),\n onTouchStart: detectTouchStart,\n ref: handleRef\n }, followCursor ? {\n onMouseMove: handleMouseMove\n } : {});\n\n if (true) {\n childrenProps['data-mui-internal-clone-element'] = true; // eslint-disable-next-line react-hooks/rules-of-hooks\n\n react__WEBPACK_IMPORTED_MODULE_2__[\"useEffect\"](() => {\n if (childNode && !childNode.getAttribute('data-mui-internal-clone-element')) {\n console.error(['Material-UI: The `children` component of the Tooltip is not forwarding its props correctly.', 'Please make sure that props are spread on the same element that the ref is applied to.'].join('\\n'));\n }\n }, [childNode]);\n }\n\n const interactiveWrapperListeners = {};\n\n if (!disableTouchListener) {\n childrenProps.onTouchStart = handleTouchStart;\n childrenProps.onTouchEnd = handleTouchEnd;\n }\n\n if (!disableHoverListener) {\n childrenProps.onMouseOver = composeEventHandler(handleMouseOver, childrenProps.onMouseOver);\n childrenProps.onMouseLeave = composeEventHandler(handleMouseLeave, childrenProps.onMouseLeave);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onMouseOver = handleMouseOver;\n interactiveWrapperListeners.onMouseLeave = handleMouseLeave;\n }\n }\n\n if (!disableFocusListener) {\n childrenProps.onFocus = composeEventHandler(handleFocus, childrenProps.onFocus);\n childrenProps.onBlur = composeEventHandler(handleBlur, childrenProps.onBlur);\n\n if (!disableInteractive) {\n interactiveWrapperListeners.onFocus = handleFocus;\n interactiveWrapperListeners.onBlur = handleBlur;\n }\n }\n\n if (true) {\n if (children.props.title) {\n console.error(['Material-UI: You have provided a `title` prop to the child of .', `Remove this title prop \\`${children.props.title}\\` or the Tooltip component.`].join('\\n'));\n }\n }\n\n const popperOptions = react__WEBPACK_IMPORTED_MODULE_2__[\"useMemo\"](() => {\n var _PopperProps$popperOp;\n\n let tooltipModifiers = [{\n name: 'arrow',\n enabled: Boolean(arrowRef),\n options: {\n element: arrowRef,\n padding: 4\n }\n }];\n\n if ((_PopperProps$popperOp = PopperProps.popperOptions) != null && _PopperProps$popperOp.modifiers) {\n tooltipModifiers = tooltipModifiers.concat(PopperProps.popperOptions.modifiers);\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, PopperProps.popperOptions, {\n modifiers: tooltipModifiers\n });\n }, [arrowRef, PopperProps]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n isRtl,\n arrow,\n disableInteractive,\n placement,\n PopperComponent,\n touch: ignoreNonTouchEvents.current\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(react__WEBPACK_IMPORTED_MODULE_2__[\"Fragment\"], {\n children: [/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"cloneElement\"](children, childrenProps), /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipPopper, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n as: PopperComponent,\n className: classes.popper,\n placement: placement,\n anchorEl: followCursor ? {\n getBoundingClientRect: () => ({\n top: positionRef.current.y,\n left: positionRef.current.x,\n right: positionRef.current.x,\n bottom: positionRef.current.y,\n width: 0,\n height: 0\n })\n } : childNode,\n popperRef: popperRef,\n open: childNode ? open : false,\n id: id,\n transition: true\n }, interactiveWrapperListeners, PopperProps, {\n popperOptions: popperOptions,\n ownerState: ownerState,\n children: ({\n TransitionProps: TransitionPropsInner\n }) => /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TransitionComponent, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n timeout: theme.transitions.duration.shorter\n }, TransitionPropsInner, TransitionProps, {\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsxs\"])(TooltipTooltip, {\n className: classes.tooltip,\n ownerState: ownerState,\n children: [title, arrow ? /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_20__[\"jsx\"])(TooltipArrow, {\n className: classes.arrow,\n ref: setArrowRef,\n ownerState: ownerState\n }) : null]\n })\n }))\n }))]\n });\n});\n true ? Tooltip.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, adds an arrow to the tooltip.\n * @default false\n */\n arrow: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip reference element.\n */\n children: _mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"].isRequired,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @ignore\n */\n className: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * Set to `true` if the `title` acts as an accessible description.\n * By default the `title` acts as an accessible label for the child.\n * @default false\n */\n describeChild: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to focus-visible events.\n * @default false\n */\n disableFocusListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to hover events.\n * @default false\n */\n disableHoverListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Makes a tooltip not interactive, i.e. it will close when the user\n * hovers over the tooltip before the `leaveDelay` is expired.\n * @default false\n */\n disableInteractive: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Do not respond to long press touch events.\n * @default false\n */\n disableTouchListener: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The number of milliseconds to wait before showing the tooltip.\n * This prop won't impact the enter touch delay (`enterTouchDelay`).\n * @default 100\n */\n enterDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds to wait before showing the tooltip when one was already recently opened.\n * @default 0\n */\n enterNextDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds a user must touch the element before showing the tooltip.\n * @default 700\n */\n enterTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * If `true`, the tooltip follow the cursor over the wrapped element.\n * @default false\n */\n followCursor: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide this prop. It falls back to a randomly generated id.\n */\n id: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * The number of milliseconds to wait before hiding the tooltip.\n * This prop won't impact the leave touch delay (`leaveTouchDelay`).\n * @default 0\n */\n leaveDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * The number of milliseconds after the user stops touching an element before hiding the tooltip.\n * @default 1500\n */\n leaveTouchDelay: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number,\n\n /**\n * Callback fired when the component requests to be closed.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onClose: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * Callback fired when the component requests to be open.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.func,\n\n /**\n * If `true`, the component is shown.\n */\n open: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * Tooltip placement.\n * @default 'bottom'\n */\n placement: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.oneOf(['bottom-end', 'bottom-start', 'bottom', 'left-end', 'left-start', 'left', 'right-end', 'right-start', 'right', 'top-end', 'top-start', 'top']),\n\n /**\n * The component used for the popper.\n * @default Popper\n */\n PopperComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the [`Popper`](/api/popper/) element.\n * @default {}\n */\n PopperProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * Tooltip title. Zero-length titles string are never displayed.\n */\n title: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .node.isRequired,\n\n /**\n * The component used for the transition.\n * [Follow this guide](/components/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.\n * @default Grow\n */\n TransitionComponent: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * Props applied to the transition element.\n * By default, the element is based on this [`Transition`](http://reactcommunity.org/react-transition-group/transition) component.\n */\n TransitionProps: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (Tooltip);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/Tooltip/Tooltip.js?"); /***/ }), +/* 103 */, +/* 104 */, +/* 105 */, /* 106 */ /*!*************************************************************!*\ !*** ./node_modules/mathjax-full/js/output/svg/FontData.js ***! @@ -486,7 +486,7 @@ eval("/* unused harmony export testReset */\n/* harmony import */ var _babel_run /***/ (function(module, exports, __webpack_require__) { "use strict"; -eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AddPaths = exports.SVGFontData = void 0;\nvar FontData_js_1 = __webpack_require__(/*! ../common/FontData.js */ 383);\n__exportStar(__webpack_require__(/*! ../common/FontData.js */ 383), exports);\nvar SVGFontData = (function (_super) {\n __extends(SVGFontData, _super);\n function SVGFontData() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGFontData.charOptions = function (font, n) {\n return _super.charOptions.call(this, font, n);\n };\n return SVGFontData;\n}(FontData_js_1.FontData));\nexports.SVGFontData = SVGFontData;\nfunction AddPaths(font, paths, content) {\n var e_1, _a, e_2, _b;\n try {\n for (var _c = __values(Object.keys(paths)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var c = _d.value;\n var n = parseInt(c);\n SVGFontData.charOptions(font, n).p = paths[n];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _e = __values(Object.keys(content)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var c = _f.value;\n var n = parseInt(c);\n SVGFontData.charOptions(font, n).c = content[n];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return font;\n}\nexports.AddPaths = AddPaths;\n//# sourceMappingURL=FontData.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/FontData.js?"); +eval("\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __values = (this && this.__values) || function(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.AddPaths = exports.SVGFontData = void 0;\nvar FontData_js_1 = __webpack_require__(/*! ../common/FontData.js */ 384);\n__exportStar(__webpack_require__(/*! ../common/FontData.js */ 384), exports);\nvar SVGFontData = (function (_super) {\n __extends(SVGFontData, _super);\n function SVGFontData() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n SVGFontData.charOptions = function (font, n) {\n return _super.charOptions.call(this, font, n);\n };\n return SVGFontData;\n}(FontData_js_1.FontData));\nexports.SVGFontData = SVGFontData;\nfunction AddPaths(font, paths, content) {\n var e_1, _a, e_2, _b;\n try {\n for (var _c = __values(Object.keys(paths)), _d = _c.next(); !_d.done; _d = _c.next()) {\n var c = _d.value;\n var n = parseInt(c);\n SVGFontData.charOptions(font, n).p = paths[n];\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_d && !_d.done && (_a = _c.return)) _a.call(_c);\n }\n finally { if (e_1) throw e_1.error; }\n }\n try {\n for (var _e = __values(Object.keys(content)), _f = _e.next(); !_f.done; _f = _e.next()) {\n var c = _f.value;\n var n = parseInt(c);\n SVGFontData.charOptions(font, n).c = content[n];\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_f && !_f.done && (_b = _e.return)) _b.call(_e);\n }\n finally { if (e_2) throw e_2.error; }\n }\n return font;\n}\nexports.AddPaths = AddPaths;\n//# sourceMappingURL=FontData.js.map\n\n//# sourceURL=webpack:///./node_modules/mathjax-full/js/output/svg/FontData.js?"); /***/ }), /* 107 */, @@ -513,7 +513,7 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 129);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 299);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Divider */ 481);\n/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ListItemIcon */ 480);\n/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ListItemText */ 363);\n/* harmony import */ var _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./menuItemClasses */ 329);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__);\n\n\nconst _excluded = [\"autoFocus\", \"component\", \"dense\", \"divider\", \"disableGutters\", \"focusVisibleClassName\", \"role\", \"tabIndex\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* getMenuItemUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst MenuItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, {\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].inset}`]: {\n marginLeft: 52\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].inset}`]: {\n paddingLeft: 36\n },\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root}`]: {\n minWidth: 36\n }\n}, !ownerState.dense && {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n}, ownerState.dense && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minHeight: 36\n}, theme.typography.body2, {\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root} svg`]: {\n fontSize: '1.25rem'\n }\n})));\nconst MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function MenuItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiMenuItem'\n });\n\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n disableGutters\n };\n const menuItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n dense: childContext.dense,\n divider,\n disableGutters\n });\n\n const classes = useUtilityClasses(props);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(menuItemRef, ref);\n let tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(MenuItemRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName)\n }, other, {\n ownerState: ownerState,\n classes: classes\n }))\n });\n});\n true ? MenuItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @default 0\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/MenuItem/MenuItem.js?"); +eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _List_ListContext__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../List/ListContext */ 130);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 300);\n/* harmony import */ var _utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/useEnhancedEffect */ 134);\n/* harmony import */ var _utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/useForkRef */ 66);\n/* harmony import */ var _Divider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../Divider */ 481);\n/* harmony import */ var _ListItemIcon__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../ListItemIcon */ 480);\n/* harmony import */ var _ListItemText__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../ListItemText */ 365);\n/* harmony import */ var _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./menuItemClasses */ 331);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__);\n\n\nconst _excluded = [\"autoFocus\", \"component\", \"dense\", \"divider\", \"disableGutters\", \"focusVisibleClassName\", \"role\", \"tabIndex\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.dense && styles.dense, ownerState.divider && styles.divider, !ownerState.disableGutters && styles.gutters];\n};\n\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n dense,\n divider,\n disableGutters,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root', dense && 'dense', disabled && 'disabled', !disableGutters && 'gutters', divider && 'divider', selected && 'selected']\n };\n const composedClasses = Object(_mui_core__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(slots, _menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* getMenuItemUtilityClass */ \"b\"], classes);\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, classes, composedClasses);\n};\n\nconst MenuItemRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n shouldForwardProp: prop => Object(_styles_styled__WEBPACK_IMPORTED_MODULE_7__[/* rootShouldForwardProp */ \"b\"])(prop) || prop === 'classes',\n name: 'MuiMenuItem',\n slot: 'Root',\n overridesResolver\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, theme.typography.body1, {\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n textDecoration: 'none',\n minHeight: 48,\n paddingTop: 6,\n paddingBottom: 6,\n boxSizing: 'border-box',\n whiteSpace: 'nowrap'\n}, !ownerState.disableGutters && {\n paddingLeft: 16,\n paddingRight: 16\n}, ownerState.divider && {\n borderBottom: `1px solid ${theme.palette.divider}`,\n backgroundClip: 'padding-box'\n}, {\n '&:hover': {\n textDecoration: 'none',\n backgroundColor: theme.palette.action.hover,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity),\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.focusOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].selected}:hover`]: {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity + theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_6__[/* alpha */ \"a\"])(theme.palette.primary.main, theme.palette.action.selectedOpacity)\n }\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].focusVisible}`]: {\n backgroundColor: theme.palette.action.focus\n },\n [`&.${_menuItemClasses__WEBPACK_IMPORTED_MODULE_16__[/* default */ \"a\"].disabled}`]: {\n opacity: theme.palette.action.disabledOpacity\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].root}`]: {\n marginTop: theme.spacing(1),\n marginBottom: theme.spacing(1)\n },\n [`& + .${_Divider__WEBPACK_IMPORTED_MODULE_13__[/* default */ \"a\"].inset}`]: {\n marginLeft: 52\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].root}`]: {\n marginTop: 0,\n marginBottom: 0\n },\n [`& .${_ListItemText__WEBPACK_IMPORTED_MODULE_15__[/* default */ \"a\"].inset}`]: {\n paddingLeft: 36\n },\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root}`]: {\n minWidth: 36\n }\n}, !ownerState.dense && {\n [theme.breakpoints.up('sm')]: {\n minHeight: 'auto'\n }\n}, ownerState.dense && Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n minHeight: 36\n}, theme.typography.body2, {\n [`& .${_ListItemIcon__WEBPACK_IMPORTED_MODULE_14__[/* default */ \"a\"].root} svg`]: {\n fontSize: '1.25rem'\n }\n})));\nconst MenuItem = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function MenuItem(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiMenuItem'\n });\n\n const {\n autoFocus = false,\n component = 'li',\n dense = false,\n divider = false,\n disableGutters = false,\n focusVisibleClassName,\n role = 'menuitem',\n tabIndex: tabIndexProp\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const context = react__WEBPACK_IMPORTED_MODULE_2__[\"useContext\"](_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"]);\n const childContext = {\n dense: dense || context.dense || false,\n disableGutters\n };\n const menuItemRef = react__WEBPACK_IMPORTED_MODULE_2__[\"useRef\"](null);\n Object(_utils_useEnhancedEffect__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(() => {\n if (autoFocus) {\n if (menuItemRef.current) {\n menuItemRef.current.focus();\n } else if (true) {\n console.error('Material-UI: Unable to set focus to a MenuItem whose component has not been rendered.');\n }\n }\n }, [autoFocus]);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n dense: childContext.dense,\n divider,\n disableGutters\n });\n\n const classes = useUtilityClasses(props);\n const handleRef = Object(_utils_useForkRef__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"])(menuItemRef, ref);\n let tabIndex;\n\n if (!props.disabled) {\n tabIndex = tabIndexProp !== undefined ? tabIndexProp : -1;\n }\n\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(_List_ListContext__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"].Provider, {\n value: childContext,\n children: /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_17__[\"jsx\"])(MenuItemRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n ref: handleRef,\n role: role,\n tabIndex: tabIndex,\n component: component,\n focusVisibleClassName: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.focusVisible, focusVisibleClassName)\n }, other, {\n ownerState: ownerState,\n classes: classes\n }))\n });\n});\n true ? MenuItem.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * If `true`, the list item is focused during the first mount.\n * Focus will also be triggered if the value changes from false to true.\n * @default false\n */\n autoFocus: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The content of the component.\n */\n children: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node,\n\n /**\n * Override or extend the styles applied to the component.\n */\n classes: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.elementType,\n\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used.\n * The prop defaults to the value inherited from the parent Menu component.\n * @default false\n */\n dense: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * @ignore\n */\n disabled: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, the left and right padding is removed.\n * @default false\n */\n disableGutters: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * If `true`, a 1px light border is added to the bottom of the menu item.\n * @default false\n */\n divider: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/master/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.string,\n\n /**\n * @ignore\n */\n role: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a\n /* @typescript-to-proptypes-ignore */\n .string,\n\n /**\n * @ignore\n */\n selected: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.bool,\n\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.object,\n\n /**\n * @default 0\n */\n tabIndex: prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.number\n} : undefined;\n/* harmony default export */ __webpack_exports__[\"a\"] = (MenuItem);\n\n//# sourceURL=webpack:///./node_modules/@mui/material/MenuItem/MenuItem.js?"); /***/ }), /* 112 */ @@ -525,7 +525,7 @@ eval("/* unused harmony export overridesResolver */\n/* harmony import */ var _b /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; -eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CacheProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Emotion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return ThemeContext; });\n/* unused harmony export _ */\n/* unused harmony export a */\n/* unused harmony export b */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createEmotionProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return hasOwnProperty; });\n/* unused harmony export u */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return withEmotionCache; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ 386);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/weak-memoize */ 387);\n/* harmony import */ var _isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js */ 517);\n/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/utils */ 227);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/serialize */ 243);\n\n\n\n\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */Object(_emotion_cache__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n key: 'css'\n}) : null);\n\nif (true) {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(function (props, ref) {\n // the cache will never be null in the browser\n var cache = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])({});\n\nif (true) {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if ( true && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if ( true && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (outerTheme) {\n return Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return Object(_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if ( true && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (true) {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* getRegisteredStyles */ \"a\"])(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])(registeredStyles, undefined, Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext));\n\n if ( true && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* insertStyles */ \"b\"])(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( false || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(type, newProps);\n\n return ele;\n});\n\nif (true) {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js?"); +eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"a\", function() { return CacheProvider; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"b\", function() { return Emotion; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"c\", function() { return ThemeContext; });\n/* unused harmony export _ */\n/* unused harmony export a */\n/* unused harmony export b */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"d\", function() { return createEmotionProps; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"e\", function() { return hasOwnProperty; });\n/* unused harmony export u */\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"f\", function() { return withEmotionCache; });\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _emotion_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @emotion/cache */ 387);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var _emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @emotion/weak-memoize */ 388);\n/* harmony import */ var _isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../isolated-hoist-non-react-statics-do-not-use-this-in-your-code/dist/emotion-react-isolated-hoist-non-react-statics-do-not-use-this-in-your-code.browser.esm.js */ 517);\n/* harmony import */ var _emotion_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @emotion/utils */ 227);\n/* harmony import */ var _emotion_serialize__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @emotion/serialize */ 243);\n\n\n\n\n\n\n\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar EmotionCacheContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */Object(_emotion_cache__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n key: 'css'\n}) : null);\n\nif (true) {\n EmotionCacheContext.displayName = 'EmotionCacheContext';\n}\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n // $FlowFixMe\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(function (props, ref) {\n // the cache will never be null in the browser\n var cache = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createContext\"])({});\n\nif (true) {\n ThemeContext.displayName = 'EmotionThemeContext';\n}\n\nvar useTheme = function useTheme() {\n return Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n if ( true && (mergedTheme == null || typeof mergedTheme !== 'object' || Array.isArray(mergedTheme))) {\n throw new Error('[ThemeProvider] Please return an object from your theme function, i.e. theme={() => ({})}!');\n }\n\n return mergedTheme;\n }\n\n if ( true && (theme == null || typeof theme !== 'object' || Array.isArray(theme))) {\n throw new Error('[ThemeProvider] Please make your theme prop a plain object');\n }\n\n return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (outerTheme) {\n return Object(_emotion_weak_memoize__WEBPACK_IMPORTED_MODULE_3__[/* default */ \"a\"])(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n\n var render = function render(props, ref) {\n var theme = Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext);\n return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_2__[/* default */ \"a\"])({\n theme: theme,\n ref: ref\n }, props));\n }; // $FlowFixMe\n\n\n var WithTheme = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"forwardRef\"])(render);\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return Object(_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_dist_emotion_react_isolated_hoist_non_react_statics_do_not_use_this_in_your_code_browser_esm_js__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(WithTheme, Component);\n}\n\n// thus we only need to replace what is a valid character for JS, but not for CSS\n\nvar sanitizeIdentifier = function sanitizeIdentifier(identifier) {\n return identifier.replace(/\\$/g, '-');\n};\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar labelPropName = '__EMOTION_LABEL_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n if ( true && typeof props.css === 'string' && // check if there is a css declaration\n props.css.indexOf(':') !== -1) {\n throw new Error(\"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css`\" + props.css + \"`\");\n }\n\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key)) {\n newProps[key] = props[key];\n }\n }\n\n newProps[typePropName] = type;\n\n if (true) {\n var error = new Error();\n\n if (error.stack) {\n // chrome\n var match = error.stack.match(/at (?:Object\\.|Module\\.|)(?:jsx|createEmotionProps).*\\n\\s+at (?:Object\\.|)([A-Z][A-Za-z0-9$]+) /);\n\n if (!match) {\n // safari and firefox\n match = error.stack.match(/.*\\n([A-Z][A-Za-z0-9$]+)@/);\n }\n\n if (match) {\n newProps[labelPropName] = sanitizeIdentifier(match[1]);\n }\n }\n }\n\n return newProps;\n};\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var type = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* getRegisteredStyles */ \"a\"])(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])(registeredStyles, undefined, Object(react__WEBPACK_IMPORTED_MODULE_0__[\"useContext\"])(ThemeContext));\n\n if ( true && serialized.name.indexOf('-') === -1) {\n var labelFromStack = props[labelPropName];\n\n if (labelFromStack) {\n serialized = Object(_emotion_serialize__WEBPACK_IMPORTED_MODULE_6__[/* serializeStyles */ \"a\"])([serialized, 'label:' + labelFromStack + ';']);\n }\n }\n\n var rules = Object(_emotion_utils__WEBPACK_IMPORTED_MODULE_5__[/* insertStyles */ \"b\"])(cache, serialized, typeof type === 'string');\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var key in props) {\n if (hasOwnProperty.call(props, key) && key !== 'css' && key !== typePropName && ( false || key !== labelPropName)) {\n newProps[key] = props[key];\n }\n }\n\n newProps.ref = ref;\n newProps.className = className;\n var ele = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__[\"createElement\"])(type, newProps);\n\n return ele;\n});\n\nif (true) {\n Emotion.displayName = 'EmotionCssPropInternal';\n}\n\n\n\n\n//# sourceURL=webpack:///./node_modules/@emotion/react/dist/emotion-element-99289b21.browser.esm.js?"); /***/ }), /* 113 */, @@ -542,6 +542,18 @@ eval("/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, /***/ }), /* 115 */ +/*!*************************************************************!*\ + !*** ./node_modules/@mui/material/IconButton/IconButton.js ***! + \*************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +eval("/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ 14);\n/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 4);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 0);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! prop-types */ 1);\n/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! clsx */ 17);\n/* harmony import */ var _mui_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @mui/utils */ 143);\n/* harmony import */ var _mui_core__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @mui/core */ 58);\n/* harmony import */ var _mui_system__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @mui/system */ 65);\n/* harmony import */ var _styles_styled__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../styles/styled */ 16);\n/* harmony import */ var _styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../styles/useThemeProps */ 30);\n/* harmony import */ var _ButtonBase__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../ButtonBase */ 300);\n/* harmony import */ var _utils_capitalize__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../utils/capitalize */ 27);\n/* harmony import */ var _iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./iconButtonClasses */ 550);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! react/jsx-runtime */ 7);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__);\n\n\nconst _excluded = [\"edge\", \"children\", \"className\", \"color\", \"disabled\", \"disableFocusRipple\", \"size\"];\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disabled,\n color,\n edge,\n size\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', color !== 'default' && `color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(color)}`, edge && `edge${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(edge)}`, `size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(size)}`]\n };\n return Object(_mui_core__WEBPACK_IMPORTED_MODULE_6__[/* default */ \"a\"])(slots, _iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__[/* getIconButtonUtilityClass */ \"b\"], classes);\n};\n\nconst IconButtonRoot = Object(_styles_styled__WEBPACK_IMPORTED_MODULE_8__[/* default */ \"a\"])(_ButtonBase__WEBPACK_IMPORTED_MODULE_10__[/* default */ \"a\"], {\n name: 'MuiIconButton',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'default' && styles[`color${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.color)}`], ownerState.edge && styles[`edge${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.edge)}`], styles[`size${Object(_utils_capitalize__WEBPACK_IMPORTED_MODULE_11__[/* default */ \"a\"])(ownerState.size)}`]];\n }\n})(({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n textAlign: 'center',\n flex: '0 0 auto',\n fontSize: theme.typography.pxToRem(24),\n padding: 8,\n borderRadius: '50%',\n overflow: 'visible',\n // Explicitly set the default value to solve a bug on IE11.\n color: theme.palette.action.active,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shortest\n }),\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette.action.active, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.edge === 'start' && {\n marginLeft: ownerState.size === 'small' ? -3 : -12\n}, ownerState.edge === 'end' && {\n marginRight: ownerState.size === 'small' ? -3 : -12\n}), ({\n theme,\n ownerState\n}) => Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, ownerState.color === 'inherit' && {\n color: 'inherit'\n}, ownerState.color !== 'inherit' && ownerState.color !== 'default' && {\n color: theme.palette[ownerState.color].main,\n '&:hover': {\n backgroundColor: Object(_mui_system__WEBPACK_IMPORTED_MODULE_7__[/* alpha */ \"a\"])(theme.palette[ownerState.color].main, theme.palette.action.hoverOpacity),\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: 'transparent'\n }\n }\n}, ownerState.size === 'small' && {\n padding: 5,\n fontSize: theme.typography.pxToRem(18)\n}, ownerState.size === 'large' && {\n padding: 12,\n fontSize: theme.typography.pxToRem(28)\n}, {\n [`&.${_iconButtonClasses__WEBPACK_IMPORTED_MODULE_12__[/* default */ \"a\"].disabled}`]: {\n backgroundColor: 'transparent',\n color: theme.palette.action.disabled\n }\n}));\n/**\n * Refer to the [Icons](/components/icons/) section of the documentation\n * regarding the available icon options.\n */\n\nconst IconButton = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"forwardRef\"](function IconButton(inProps, ref) {\n const props = Object(_styles_useThemeProps__WEBPACK_IMPORTED_MODULE_9__[/* default */ \"a\"])({\n props: inProps,\n name: 'MuiIconButton'\n });\n\n const {\n edge = false,\n children,\n className,\n color = 'default',\n disabled = false,\n disableFocusRipple = false,\n size = 'medium'\n } = props,\n other = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ \"a\"])(props, _excluded);\n\n const ownerState = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({}, props, {\n edge,\n color,\n disabled,\n disableFocusRipple,\n size\n });\n\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/Object(react_jsx_runtime__WEBPACK_IMPORTED_MODULE_13__[\"jsx\"])(IconButtonRoot, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ \"a\"])({\n className: Object(clsx__WEBPACK_IMPORTED_MODULE_4__[/* default */ \"a\"])(classes.root, className),\n centerRipple: true,\n focusRipple: !disableFocusRipple,\n disabled: disabled,\n ref: ref,\n ownerState: ownerState\n }, other, {\n children: children\n }));\n});\n true ? IconButton.propTypes\n/* remove-proptypes */\n= {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the d.ts file and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n\n /**\n * The icon to display.\n */\n children: Object(_mui_utils__WEBPACK_IMPORTED_MODULE_5__[/* default */ \"a\"])(prop_types__WEBPACK_IMPORTED_MODULE_3___default.a.node, props => {\n const found = react__WEBPACK_IMPORTED_MODULE_2__[\"Children\"].toArray(props.children).some(child => /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__[\"isValidElement\"](child) && child.props.onClick);\n\n if (found) {\n return new Error(['Material-UI: You are providing an onClick event listener to a child of a button element.', 'Prefer applying it to the IconButton directly.', 'This guarantees that the whole